2021年3月10日 星期三

圖學練功筆記 Week03

1. 註冊 github.com

1.1. 認證email,再6碼認證

2. 改 profile 的照片


3. 我們要新增 GitHub 的專案倉庫

3.1. Repo 裡面, New, 取名 2021graphics

3.2. 勾 Add README

3.3. 勾 Add .gitignore 再選 C++ 完成

(等一下, 我們要把 CodeBlocks專案放上去)


4. 上傳你的程式

4.1. 在 2020graphics專案倉庫Add file 

4.2. Upload files(檔案,目錄) commit確認


5. 再寫 GLUT專案(今天上課要用)

5.1. File-New-Project, GLUT

5.2. 你的桌面有 2020電腦圖學

裡面的 freeglut-.....zip 安裝

5.3. 把 libfreeglut.a 改 libglut32.a

5.4. 把上週的程式開起來....

5.5. 把 week03-2 也上傳 GitHub 囉!!!


6. 畫圓型 方法1: 使用實心的圓球

6.1. 把上週的基礎 main() 及 display()複製

6.2. display()加 glutSolidSphere(半徑,30,30);


7. 畫圓型 方法2: 使用 cos() sin() 單位圓

7.1. #include <math.h>

7.2. 在 display() 裡用 for(迴圈)

     glBegin(GL_POLYGON);

7.3. for( float a=0; a<3.14159*2; a+= 0.1){

7.4.      glVertex2f( cos(a), sin(a) );

      }

      glEnd();

8. 相片檢視器 Photo Viewer

8.1. Windows 10 有時無法使用「相片檢視器」

8.2. 老師上課有傳修復相片檢視器的檔案

8.3. Windows 10 Photo Viewer Recovery.reg

8.3. 執行後, 便可改變 圖檔對應的開啟程式


9. GitHub 做你的網站 (你有一個 .io的網址)

9. 網址: 你的帳號 jsyehmcu.github.io

9.1. 你的帳號下開 ^^^^^^^^^^^^^^^^^^ 同名的專案倉庫

9.2. 把 main branch 設定成 gh-pages (GitHub Pages)

9.3. README.md 可以改內容, 就完成了


https://hackmd.io/@jsyeh 裡面有 GitHub 教學!!!!

沒有留言:

張貼留言

距地表面160 Week11

 #include "glm.h" GLMmodel* pmodel = NULL; void drawmodel(void) {     if (!pmodel) { pmodel = glmReadOBJ("data/porsche.obj...