2019年4月10日 星期三

week03

 
 

week03:

Translate(移動) Rotate(旋轉)以及Scale(放大縮小)

 
到老師的網址http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/下載windows data glut.dll,然後將windows解壓縮,並且將data的資料夾放進windows裡面
 

然後到網站打freeglut windows下載freeglut到桌面
 
接著到windows資料夾裡就能打開Transformation看到一台保時捷能調整Translate(移動) Rotate(旋轉)以及Scale(放大縮小)
 
接著打開codeblock,然後把原本的程式碼刪光光,並且自己打下列的程式碼上去

 

呼叫茶壺的程式碼

#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("week03 translate");
    glutDisplayFunc(display);
    glutMainLoop();
}


沒有留言:

張貼留言