(1). 練習10題 100%

(2). 網址: jsyeh.org/3dcg10 裡面載<1>. data.zip <2>. windows.zip <3>. glut32.dll
放入windows 文件夾裡面,打開Transformation.exe
嘗試著用右手來看車子的旋轉(右手安培定則)
(3). 負負得正 若glRotatef(-90.0, 0.00, -1.00, 0.00)時,會與glRotatef(90.0, 0.00, 1.00, 0.00)一模一
樣。
(4). 口訣: 左耳碰左肩, 從下往上讀, 畫圈圈
glPushMatrix(); //備份矩陣
glTranslatef(x, y, z); //移動
glRotatef(角度, x, y, z); //旋轉
glScalef(x, y, z); //縮放
glBegin(GL_POLYON); //開始
glcolor3f(r, g, b); //顏色
glNormal3f(nx, ny, nz); //法向量
glTexcoord3f(tx, ty); //貼圖座標
glVertex3f(x, y ,z); //頂點
glEnd(); //結束畫
glPopMatrix(); //還原Matrix
沒有留言:
張貼留言