2019年3月7日 星期四

Week03 鍾嘉穎 2019-03-07

如何點名
      1. 打開Veyon Config
      2. 服務 --> 啓動

1. 主題: 點, 線, 面, 顏色
      1. 點進去小葉的網頁: http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/
      2. 下載 Example裏的 win32, glut32.dll, data
      3. 解壓縮到下載
      4. 把已解壓的 data 資料夾拉到windows裏
      5. 把已解壓的 glut32.dll 資料夾拉到windows裏
      6. 打開 Shapes.exe

      在 Shapes.exe 裏
          左邊 右鍵: 換 Big 點, 不同顏色
            右邊 右鍵: 換Shape
                   左鍵: Dvag 數字

2. 實作: 第一個親手寫出 (水壺)
      1. 先載入freeglut (跟第一週一樣)
          1. Google search "freeglut windows"
            2. 從Transmission Zero 下載 "freeglut 3.0.0 MinGW Package"
            3. 解壓縮後放到桌面
            4. 在lib複製一個"libfreeglut.a"命名為"libglut32.a"
            5. CodeBlocks 開
            6. File  ->  New -> Project -> GLUT Project
            7. 把location改成"C:\Users\user\Desktop\freeglut"
      2. 把main的程式碼刪掉
      3. 把程式碼打上去
          #include <GL/glut.h>
            void display(){
                glutSolidTeapot( 0.3 );
                glutSwapBuffers();
            }
            int main(int argc, char**argv){
                glutInit(&argc,argv);
                glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
                glutCreateWindow("06160912");
                glutDisplayFunc(display);
                glutMainLoop();
            }
      4. 把水壺換顏色(加一句)
            glColor3f(1.00,0.50,0);

3. 回家作業
      1. 畫出一個圖片
      2. 用小畫家找到坐標和顏色
      3. 用CodeBlocks畫一個圖

沒有留言:

張貼留言