这是用OpenGL画出来的图
我希望是这样的效果
其中用到的语句是
  GLsizei width,height;
    GLdouble aspect;
    width = cx;
    height = cy;
    if(cy==0)
    {
        aspect = (GLdouble)width;
    }
    else
    {
        aspect = (GLdouble)width/(GLdouble)height;
    }
    glViewport(20,20,width,height);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
//    gluOrtho2D(0.0,500.0*aspect,0.0,500.0);
gluPerspective(60, aspect, 0, -100.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); float light_position[]={5.0,5.0,5.0,1.0}; //设置光源
float light_diffuse[]={1.0,1.0,1.0,1.0};
float light_ambient[]={1.0,1.0,1.0,1.0};
float light_specular[]={1.0,1.0,1.0,1.0};
glLightfv(GL_LIGHT0,GL_AMBIENT,light_ambient);
glLightfv(GL_LIGHT0,GL_DIFFUSE,light_diffuse);
glLightfv(GL_LIGHT0,GL_SPECULAR,light_specular);
glLightfv(GL_LIGHT0,GL_POSITION,light_position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
请问如何调整视角?
3X