(1)複習T.R.S
step1: http://jsyeh.org/3dcg10 下載 , windows.zip, glut32.dll
step2: windows.zip解壓縮至"windows\",將data.zip打開把資料夾 data 和 glut32.dll 移到windows
step4:打開Transformation.exe分別按住glTranslatef和glRptatef查看2個的不同
step3:右鍵[s]Swap translate/rotate,glTranslatef和glRptatef兩者數據交換
[r]Reset parameters 重設全部設定
(1)T.R.T
step1:codeblocks->file->New->Project->OpenGLproject->Sources->main.c moodle下載freeglut-MinGW-3.0.0-1.mp.zip並解壓縮->freeglut的lib複製 libfreeglut.a改名為libglut32.a->codeblackile->New->Project->GLUTproject
->Sources->main.c
step2:改變一開始的程式碼
glPushMatrix();
glTranslated(-2.4,1.2,-6);//球的位置左上方
glRotated(a,0,0,1);//轉動
glutSolidSphere(1,slices,stacks);
glPopMatrix();
glPushMatrix();
glRotated(a,0,0,1);///轉動,樓下的...glTranslated(-2.4,1.2,-6);///整個移到左下角
glutSolidSphere(1,slices,stacks);
glPopMatrix();
///把其他都變成白色
glColor3d(1,1,1);
glPushMatrix();
glTranslated(0,1.2,-6);
glRotated(60,1,0,0);
glRotated(a,0,0,1);
glutSolidCone(1,1,slices,stacks);
step3:複製fb程式碼









沒有留言:
張貼留言