the figure is a rectangle,the x is -10~10,y is 0~10,z is -100~100.It is piece together by glArrayElement.the data is too much.I leave out.thanks for your help
void init()
{

glClearColor (0.0, 0.0, 0.0, 0.0);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_DEPTH_TEST);
glShadeModel(GL_SMOOTH);

}
void ondisplay(void)

{
int i=0;
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glColorPointer(3,GL_FLOAT,0,colors);
glColorPointer(3,GL_FLOAT,0,vertex);
GLfloat position[]={30,40.0,0.0};
glRotated((GLfloat)spin,0.0,1.0,0.0);
glLightfv(GL_LIGHT0,GL_POSITION,position);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glBegin(GL_TRIANGLE_FAN);
for(i=0;i<600;i++)
glArrayElement(i);
glEnd();
glutSwapBuffers();
}
void onshape(int w,int h)
{
glViewport(0,0,w,h);
glMatrixMode( GL_PROJECTION );// 先设置投影矩阵
glLoadIdentity();

if(w<=h)
glOrtho(-100,100,-100*(GLfloat)h/(GLfloat)w,100*(GLfloat)h/(GLfloat)w,-100,100);
else
glOrtho(-100*(GLfloat)h/(GLfloat)w,100*(GLfloat)h/(GLfloat)w,-100,100,-100,100);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

}
void Idle()
{
spin=(spin+5)%360;
glutPostRedisplay();
Sleep(15);
}


void main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_RGBA|GLUT_DEPTH|GLUT_DOUB LE);
glutInitWindowSize(1000,700);
glutInitWindowPosition(100,100);
glutCreateWindow("dingdian");

glutDisplayFunc(ondisplay);
glutReshapeFunc(onshape);
glutIdleFunc(Idle);

init();
glutMainLoop();

}