2018年3月19日 星期一

week04_馬明

2018-03-19
Week04
主題:移動、旋轉、縮放
範例:Transformation

下載所需檔案
jsyeh.org/3dcg10下載windows.zip、data.zip、glut32.dll

解壓縮windows.zip至資料夾,data解壓縮後和glut32.dll丟進windows
使Windows的Transformation.exe可以開啟並且不會閃退



**說明(考試重點)
g1PushMatrix();備份矩陣
glTranslatef(x,y,z);移動
glRotatef(角度,X,Y,Z);轉動(右手安培)
glScalef(x,y,z);縮放
glBegin(GL_POLYON);開始畫
   glColor3f(r,g,b);顏色
   glVertex3f(x,y,z);頂點
End();結束畫
glBegin();對應
glPopMatrix();還原矩陣







CodeBlocks開始專案GLUT
實作讓茶壺自己轉動



用滑鼠控制茶壺轉動



MAYA式操控


沒有留言:

張貼留言