week06
1. 介紹電腦圖學之父 Ivan Sutherland
到 https://jsyeh.org/3dcg10/ 下載windows.zip跟data.zip
執行Transformation.exe 下方右鍵 Swap Translate / Rotate
自轉 v.s. 公轉
2. keyboard 互動
利用glutKeyboardFunc(keyboard) 和 keyboard函式,印出鍵盤配合的點座標
3. 加上 mouse() 及 motion()函式,希望能完整互動
4. 做出 glTranslatef() 移動
5. 實作「縮放」程式,利用 float scale=1.0 這個變數,如果 if(mousX大於oldX)就讓 scale 放大 1%,反過來就讓 scale 變小 1%
6. 利用 if(key=='w' 或 key=='W') now=1做移動, if(key=='r' 或 key=='R')now=3 做縮放。接下來在 motion()裡,if(now==1)做移動的計算,if(now==3)做縮放的計算
沒有留言:
張貼留言