2023年5月24日 星期三

Vicky-week15-Camera (投影、運鏡)

 Week15☝

    https://jsyeh.org/3dcg10/ 裡面下載window data檔案

     - data.zip
     - win32  windows.zip



    -windows.zip  👉  下載 \ windows \ Transformation.exe
    -data.zip  👉  下載 \ windows \ data \  很多模型檔
    

    打開Projection.exe檔




glPerspective()裡的參數 英文都是縮寫
gluLookAt()

從哪裡看 <-- eye
看哪裡 <-- center
食指向上 指到誰就拍誰的概念 <-- up


fovy : field of view(Y方向) : 視野的角度

    fov的角度越大,東西就會越小
    最大到179度 180度就看不到了

aspect : aspect ratio : 長寬比

zNear zFar : 遠近

    Z方向進的切一刀 遠的切一刀
    決定哪個範圍會投影到方塊裡

🔻更改長寬比2:1


Week15✌

開啟GLUT專案 : week15_1_gluPerspective


用Git Bash將 2023graphicsa 資料夾clone下來


開始修改程式碼內容


將 glFrustum() 改成 glOrtho()
看看透視投影垂直投影的差別






Week15👌

更改長寬比


🔻執行小黑





圓圓胖胖的茶壺!!

🔻執行小黑





接著我們用 motion()函式,移動滑鼠,滑鼠往左移動從左邊看、往右移動從右邊看


🔻執行小黑





最後最後!!

打開Final檔案 今天要切換不同關節改變不同的角度







讀入檔案motion.txt

結束!!

最後上傳檔案git指令
1. git指令
2. cd desktop
3. git clone https://github.com/你的帳號/2023graphicsa
4. cd 2023graphicsa
5. start .
6. git add . 
7. git status

8. git config --global user.email "電子郵件"

9. git config --global user.name "帳號名vickylo0919"

10. git commit -m "week"

11. git push

沒有留言:

張貼留言