Cubic Spline三次样条曲线
摘要://C9.cpp//CreatNatuarlCubicSpline#include<iostream.h>constintN=6;voidNCS(doublex[],doublea[],doubleb[],doublec[],doubled[],intn){doubleh[N-1],alpha[N-1],l[N],z[N],u[N];inti;for(i=0;i<n-1;i++){h[i]=x[i+1]-x[i];}for(i=1;i<n-1;i++){alpha[i]=3*(a[i+1]-a[i])/h[i]-3*(a[i]-a[i-1])/h[i-1];}//Now
阅读全文
posted @ 2013-03-07 09:13