
// Question 4

LX=[-2,-1,0,1,2]
F=cos(LX)
FP=-sin(LX)
T=[-4:0.001:4]

S=hermite(LX,F,FP,T)

scf(0)
clf()
isoview(-4,4,-1,1)
plot2d(T,S,3)
plot2d(T,cos(T))

// Question 5

scf(1)
clf()
T=[0:0.14:1.35]
P=[[1.6;9],[9;9],[8;4],[1;7],[1;3],[6;1],[9;3]]
L=[0:0.01:1]
S=bspline(T,P,10,2,L)
plot2d(S(1,:),S(2,:))
