2024年4月25日 星期四

Week10 電腦圖學

 1.從上課軟體下載freeglut




 2.將壓縮檔解壓到桌面

3.點開freeglut後復製其連結


4.點開lib後將freeglut.a復製


5.改名為libglut32.a (124KB)



6.到codeblock開新的專案 file > project,(當名為week10-1_glutWireCube_myBody_myArm)



7.貼上上周的week09-3程式碼



8.只留下空心方塊的部分


9.將myBody(),myArm(),寫出來

10.到codeblock開新的專案 file > project,(當名為week10-2_rotate_myArm)


11.貼上week10-1程式碼

12.幫arm加上旋轉的程式碼
13.到codeblock開新的專案 file > project,(當名為week10-3_rotate_translate_myArm)


14.加一行translatef(0.15,0,0);在rotate後面

15.到codeblock開新的專案 file > project,(當名為week10-4_translate_rotate_translate_myArm)



16.貼上剛剛的程式碼

17.將arm移動到邊邊

18.到codeblock開新的專案 file > project,(當名為week10-5_TRT_TRT_myArm)



19.貼上剛剛程式碼
20.再插入一個剛剛旋轉的方格改一下位置
21.到codeblock開新的專案 file > project,(當名為week10-6_left_right_myArm)



22.將左手的部分寫出來

23.到codeblock開新的專案 file > project,(當名為week10-7_mouse_motion_angle_myArm)



24.貼上剛剛的程式碼後,將angle++去掉改為用滑鼠操控
25.到codeblock開新的專案 file > project,(當名為week10-8_mouse_motion_angle_2_myArm)


26.將左邊的angle改為負的

27.到codeblock開新的專案 file > project,(當名為week10-9_PlaySound)


28.貼上剛剛的程式碼,在#include加上<mmsystem.h>
29.將聲音放入c槽
30.加入聲音

31.上傳github



沒有留言:

張貼留言