#week04_mouse_glScalef
1.安裝freeglut,改lib\libfreeglut.a複製成libglut32.a
2.File-New-Project,GLUT專案 week04_mouse_glScalef
3.手動輸入十行程式,再加上週的week03_mouse_glRotatef的部分程式
#week04_keyboard_mouse_glScalef
1.File-New-Project,GLUT專案 week04_keyboard_mouse_glScalef
#下載課本範例
1.到http://jsyeh.org/3dcg10下載data ,win32
1.File-New-Project,GLUT專案 week04_translate_rotate_scale
2.貼上前一個程式碼,再刪掉一些內容
3.glutIdleFunc()閒閒沒事時,就做的事
4.void display()裡,加上glRotatef(angle++,0,0,1);
4.void display()裡,加上glRotatef(angle++,0,0,1);
5.會自動轉動
6.加上glTranslatef(0.8,0,0);和glScalef(0.3,0.3,0.3);
7.加顏色
#交換程式碼translate/rotate
整個"....."全部轉動
把"大小沒變的藍色車子"移到右邊
大小沒變的藍色車子
藍色的車子
車子
#week04_rotate_translate_scale
1.File-New-Project,GLUT專案 week04_rotate_translate_scale
2.複製剛剛的程式碼
3.改變兩行(交換glTranslatef()和glRotatef()順序)

沒有留言:
張貼留言