2017年10月12日 星期四

翁驊成的學習筆記 week 05

week 05 Viewing


step 1.範例


1.到http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/下載data.zip,windows.zip,glut32.dll並解壓縮

2.操作transformation.exe

3.操作projection.exe
glu(常用功能)

gluPerspective(fovy,aspect,zNear,zFar);

fovy //視野大小
aspect //xy比例
zNear,zFar //遠近透視


gluOrtho(left,right,bottom,up,near,far);
gluFrustum(left,right,bottom,up,near,far);

gluLookAt(eyeX,eyeY,eyeZ, //自己位置
                   centerX,centerY,centerZ, //目標位置
                   upX,upY,upZ);

step 2.實作範例

1.先到moodle下載week05
2.setting->compiler改成gcc  //或是都不打勾  //或是.cpp改.c 
3.執行




沒有留言:

張貼留言