glPushMatrix(); //右球
glRotatef(angleX,0,1,0);
glTranslatef(0.4,0,0);
glutSolidSphere(0.15,30,30);
glPushMatrix();//右手,要放在右球內才可以以右球為軸旋轉
glRotatef(angle2,0,0,1);
glTranslatef(0.3,0,0);
glScalef(2,0.5,0.6);
glutSolidCube(0.2);
glPopMatrix();
glPopMatrix();
沒有留言:
張貼留言