本周上課內容:
(1)3DTRT轉動
(2)矩陣、投影矩陣
(3)攝影機運鏡
(4)會動的機器人
1.http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/下載
data.zip→桌面→windows\data\模型.obj
windows.zip→桌面\windows\Projection.exe(執行)
glut32.dll→桌面\windows\glut32.dll
2.TODO:gluLookAt(eyeX,eyeY,eyeZ(修改、攝影機),centerX,centerY,centerZ,upX,upY,upZ);
eye-表示攝影機視角的x、y、z座標
center-表示中央位置的x、y、z座標
up-表示俯視視角的x、y、z座標
3.將04160011_hw1_projection.zip解壓縮,並且用codeblocks開啟
改glutLookAt(..................),改eyeX、eyeY、eyeZ
4.改2.中,程式碼的center、up
5.將04160011_hw2_gluPerspective.zip解壓縮,並且用codeblocks開啟
修改gluPerspective(fovy(視野角度),1(xy比例),Near,Far)
6.示範main_pushTRTpop.cpp:
將04160011_hw2_gluPerspective.zip解壓縮,並將老師的main_pushTRTpop.cpp複製,了解關於組合的程式碼
glPushMatrix();
glTranlatef();掛上去
glRotatef();旋轉
glTranslatef();定旋轉中心
畫手臂-重複
glPopMatrix();






沒有留言:
張貼留言