2017年5月8日 星期一

Week12 龜山下智久的迷妹筆記

新增說明文字
#include <GL/glut.h>
float eyeX=0, eyeY=0, eyeZ=1;
float centerX=0, centerY=0, centerZ=0;
float upX=0, upY=1, upZ=0;
static void display(void)
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glColor3d(1,0,0);
    glPushMatrix();
        gluLookAt(eyeX, eyeY, eyeZ,
                  centerX, centerY, centerZ,
                  upX, upY, upZ);
        glutSolidTeapot(0.3);
    glPopMatrix();
    glutSwapBuffers();
}


第二節 專研meeting
動起來的茶壺
glPushMatrix();
glTranslatef();掛上去
glRotatef();旋轉
glTranslatef();定旋轉中心
畫手臂
重複
glPopMatrix();



沒有留言:

張貼留言