06-21-2001, 10:29 PM

i am a beginner. This is my code:

glClearColor(0.3f,0.6f,0.7f,1.0f);

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glMatrixMode(GL_MODELVIEW);

glLoadIdentity();

glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);

glLineWidth(1.0f);

glColor3f(0.0f,0.0f,0.0f);

glPushMatrix();

for (int i=0;i<(Numplanes-1);i++)

glBegin(GL_TRIANGLE_STRIP);

for (int j=0;j<(NumPointsOnPlane);j++)

{

glVertex3d(a[i][j],b[i][j],c[i][j]);

glVertex3d(a[i+1][j],b[i+1][j],c[i+1][j]); } glVertex3d(a[i][0],b[i][0],c[i][0]); glVertex3d(a[i+1][j],b[i+1][j],c[i+1][j]);

glEnd();

}

and a={3.7558881e+02 3.7241258e+02

-3.6916080e+02 -3.7014718e+02 ....}

b=

{2.0283400e+03 2.0298425e+03

2.0315526e+03 2.0330736e+03 ....}

c={-1.6000000e+02 -1.6000000e+02

-1.6000000e+02 -1.6000000e+02

...

}

I think there are something wrong,but i don't know where it is .

could you help me ?

thank you very much.

glClearColor(0.3f,0.6f,0.7f,1.0f);

glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

glMatrixMode(GL_MODELVIEW);

glLoadIdentity();

glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);

glLineWidth(1.0f);

glColor3f(0.0f,0.0f,0.0f);

glPushMatrix();

for (int i=0;i<(Numplanes-1);i++)

glBegin(GL_TRIANGLE_STRIP);

for (int j=0;j<(NumPointsOnPlane);j++)

{

glVertex3d(a[i][j],b[i][j],c[i][j]);

glVertex3d(a[i+1][j],b[i+1][j],c[i+1][j]); } glVertex3d(a[i][0],b[i][0],c[i][0]); glVertex3d(a[i+1][j],b[i+1][j],c[i+1][j]);

glEnd();

}

and a={3.7558881e+02 3.7241258e+02

-3.6916080e+02 -3.7014718e+02 ....}

b=

{2.0283400e+03 2.0298425e+03

2.0315526e+03 2.0330736e+03 ....}

c={-1.6000000e+02 -1.6000000e+02

-1.6000000e+02 -1.6000000e+02

...

}

I think there are something wrong,but i don't know where it is .

could you help me ?

thank you very much.