一. 用excel實作
(可以用excel使用內差公式)=A2*90000+(1-A2)*30000
交叉相乘 (新) (舊)
課堂作業二:
可以自主轉動
重點:
#include <stdio.h>
int oldX=0, oldY=0;
void keyboard(unsigned char key,int x,int y)
{
if(key=='0') now=0;
if(key=='1') now=1;
if(key=='2') now=2;
if(key=='3') now=3;
if(key=='4') now=4;
if(key=='5') now=5;
if(key=='6') now=6;
if(key=='7') now=7;
if(key=='8') now=8;
}
void mouse(int button, int state, int x, int y)
{
oldX=x; oldY=y;
glutPostRedisplay();
}
void motion(int x, int y)
{
angle[now] +=(x-oldX);
oldX=x;
glutPostRedisplay();
}
void timer(int t)
{
glutTimerFunc(1000,timer,t+1);
interpolation();
glutPostRedisplay();
}




沒有留言:
張貼留言