抛物线样条曲线问题提出有空间的n个点p1,p2,p3,……,pn要用一条曲线光滑连接p1p2p3pn解决问题的思路选择一种插值方法:牛顿插值,拉格朗日插值等1)假设它们是一条n阶多项式表示的曲线上的n个点,y=an-1xn-1+an-2xn-2+……+a1x+a0。将n个已知点代入解方程,可得。2)用分段插值p1p2p3pn最简单的插值曲线抛物线的参数方程p(t)=a0+a1t+a2t20=t=1x(t)=a0x+a1xt+a2xt2;y(t)=a0y+a1yt+a2yt2过三点p1,p2,p3定义一条抛物线(参数形式)令p1t=0;p2t=0.5;p3t=1;代入方程可得:方程系数与已知点的关系:p1p2p3最简单的插值曲线对p(t)=a0+a1t+a2t2a0=p1;a1=4p2-p3-3p1;a2=2p1+2p3-4p2p1p2p33210011432421)(2ppptttp抛物线的加权合成对pi(t)=ai0+ai1t+ai2t2ai0=pi;ai1=4pi+1-pi+2-3pi;ai2=2pi+2pi+2-4ppi+1p1p2p32120011432421)(iiiippptttpp4p5加权合成方案在pi(t)与pi+1(t)重叠段Pi(t)=(1-T)*pi(ti)+T*pi+1(ti+1)0=T=1p1p2p3p4p5统一参数Pi(t)=(1-T)*pi(ti)+T*pi+1(ti+1);0=T=1pi(ti)的合成段:0.5=ti=1pi+1(ti+1)的合成段:0=ti+1=0.5取0=t=0.5则:T=2t;ti=0.5+t;ti+1=tPi(t)=(-4t3+4t2-t)*pi+(12t3-10t2+1)pi+1+(-12t3+8t2+t)pi+2+(4t3-2t2)pi+3p1p2p3p4p5整条曲线i=1时Pi(t)=pi(ti);0=ti=0.5i=n-1时Pi(t)=pi(ti);0.5=ti=1i=2,……,n-2时Pi(t)=(-4t3+4t2-t)*pi+(12t3-10t2+1)pi+1+(-12t3+8t2+t)pi+2+(4t3-2t2)pi+30=t=0.5p1p2p3p4p5抛物样条曲线的性质端点性质已知端点切矢量p1’,pn’时p0=p2-p1’;pn+1=pn-1+pn’自由端点时p0=p1;pn+1=pn形成封闭曲线时pn+1=p1;p0=pn;pn+2=p2p1p2p3p4p5p6p0抛物样条曲线的性质曲线性质Pi(t)=(-4t3+4t2-t)*pi+(12t3-10t2+1)pi+1+(-12t3+8t2+t)pi+2+(4t3-2t2)pi+3整体C1连续p1p2p3p4p5p6p0抛物样条曲线的程序p1p2p3p4p5p6p0