2017年10月12日 星期四

魏建新的第5週學習單

複習上周內容
1.去jsyeh.org/3dcg10把data.zip,windows.zip,glut32.dll下載解壓到同一個文件中

2.把EXE打開複習




透視投影:
void gluPerspective(GLdouble fovyGLdouble aspectGLdouble zNear, GLdouble zFar);
fovy:指定在y方向的視角角度
aspect:指定x方向視野的比例(y/x)
zNear、zFar:指定觀察者到可視最近、遠平面的距離

平行投影-正交投影:
void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble topGLdouble nearVal, GLdouble farVal);   正方體
left、right:指定左、右剪切平面
bottom、top:指定上、下剪切平面
nearVal、farVal:指定近、遠剪切平面

指定視角:
void gluLookAt(GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ,
GLdouble centerX, GLdouble centerY, GLdouble centerZ,
GLdouble upX, GLdouble upY, GLdouble upZ);
eyeX, eyeY, eyeZ:指定從哪裡看
centerX, centerY, centerZ :指定看哪裡
upX, upY, upZ :指定向上的向量

沒有留言:

張貼留言