2015年5月20日 星期三

02160102_李劭宣_Week13

gluLookAt(eye x,y,z);
gluLookAt(center x,y,z);
gluLookAt(up x,y,z);

螢幕的運轉更深洞
xy軸更大


運鏡
#include <GL/glut.h>

void display()
{
    glPushMatrix();
    glutSolidTeapot(100);
    glPopMatrix();
    glFlush();
}
int main(int argc,char**argv)
{
    glutInit(&argc,argv);
    glutInitWindowSize(800,600);
    glutCreateWindow("3D");
    glutDisplayFunc(display);
    glViewport(0,0,800,600);
    glMatrixMode(GL_PROJECTION);
    glOrtho(-400,400,-300,300,-1000,1000);
    glMatrixMode(GL_MODELVIEW);

    glutMainLoop();

}

沒有留言:

張貼留言