Airplane outline
Example from the PscFunctions package
The
CPscHermite
routine computes a parametric
equation of a
piecewise-cubic interpolating Hermite polynomial
of degree 3. This
Hermite polynomial
approximates 2D or 3D set of points. Coordinates of two ending points and tangent vectors to them uniquely determine segments of the curve. In some nodes left-hand and right-hand tangent vectors can not coincide.
The most of the following example contains a code of input data preparation.
> | with(PscFunctions): Lxy:=[[1,0],[1,2],[4,0],[4,2],[1,4],[2,12],[12,10],[12,12],[2,16],\ [2,22],[0,26],[-2,22],[-2,16],[-12,12],[-12,10],[-2,12],\ [-1,4],[-4,2],[-4,0],[-1,2],[-1,0],[1,0]]: Lt:=[0,2,5,7,10,18,28,30,40,46,50,\ 54,60,70,72,82,90,93,95,98,100,102]: DER:=[[0,1],[[0,1],[3,-2]],[[3,-2],[0,1]],[[0,1],[-3,2]],\ [[-3,2],[1/2,1/2]],[[0,1],[5,-1]],[[5,-1],[0,1]],\ [[0,1],[-5,2]],[[-5,2],[0,1]],[0,1],\ [[-1,1],[-1,-1]],[0,-1],[[0,-1],[-5,-2]],[[-5,-2],[0,-1]],\ [[0,-1],[5,1]],[[5,1],[0,-1]],[[1/2,-1/2],[-3,-2]],\ [[-3,-2],[0,-1]],[[0,-1],[3,2]],[[3,2],[0,-1]],\ [[0,-1],[1,0]],[1,0]]: xe,ye:=CPscHermite(Lxy,param=Lt,t,tanvectors=DER): pp:=plot([xe,ye,t=0..102],thickness=2,color=BLACK,scaling=CONSTRAINED,numpoints=1000): pnts:=plots[pointplot](Lxy,symbolsize=20): plots[display](pnts,pp); |
Here is a parametric equation of this curve.
> | 'X'=xe; 'Y'=ye; |