void drawsphere() { #define PI 3.14159265358979323846f int width = 32; int height = 16; float theta, phi, *dat; int i, j, t, ntri, nvec, *idx; nvec = (height-2)* width+2; ntri = (height-2)*(width-1)*2; dat = (float*) malloc( nvec * 3*sizeof(float) ); idx = (int*) malloc( ntri * 3*sizeof(int) ); for( t=0, j=1; j