------------------------------------------------------------------------------------------
Week5 2018/03/30
(1) T ,R ,S ,mouse ,motion
(2)主題: T-R-T轉動
(1) T ,R ,S ,mouse ,motion
(2)主題: T-R-T轉動
(3)主題: 階層轉動
(3)矩陣
(4)回家作業
(4)回家作業
----------------------------------------------------------------------------------------------
Class practice1 試試看別人的程式如何動
--與上週week03一樣方式開啟Class practice1
△老師讓大家下載 data.zip, windows.zip, glut32.dll 這3個檔案的網址在 http://jsyeh.org/3dcg10
1.開起網址
2.下載以下三個檔案,並且解壓縮
1.開起網址
2.下載以下三個檔案,並且解壓縮
3.打開 windows -> 把glut32.dll 黨複製到其中
4.打開 shapes.exe -> 執行
△把glut.dll、data檔案丟入windows裡面才可開啟Transformation.exe
4.打開 shapes.exe -> 執行
△把glut.dll、data檔案丟入windows裡面才可開啟Transformation.exe
△左上、右上視窗 點右鍵 可以轉換功能或樣式
△點選下方數字 長按 字數上下移動可以改變數字大小
----------------------------------------------------------------------------------------------
Class practice2
1.用codeblack開啟glut檔案
2.公轉程式碼修改為 :
static void display(void)
{
const double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
const double a = t*90.0;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3d(1,0,0);
glPushMatrix();///藉由註解來看看有甚麼不同
glRotated(a,0,0,1);///轉動 下樓的...
glTranslated(-2.4,1.2,-6);///整個移到左上角
glutSolidSphere(1,slices,stacks);
glPopMatrix();
///把其他的都變成白色
glColor3f(1,1,1);
glPushMatrix();
glTranslated(0,1.2,-6);
glRotated(60,1,0,0);
glRotated(a,0,0,1);
glutSolidCone(1,1,slices,stacks);
glPopMatrix();
..........
----------------------------------------------------------------------------------------------
Class practice3
1.
2.






沒有留言:
張貼留言