> this snippet code taken form Hermite3d what are
the curve is drawn between p1 and p2
p0 and p3 provide tangent information.
> how to calculate tangent vector
The vector p0->p1 is the tangent vector at p1.
The vector p2->p3 is the tangent vector at p3.
This might make these 'cardinal splines'
> and pRight,pLeft,sRight and pLeft used for.
There is a stack implemented in the arrays
s runs from 0 to 1
There is a value on the left and a value on the right
There is also a point on the left and point on the right
The system is initialized as:
sLeft=5B0=5D =3D 0;
sRight=5B0=5D =3D 1;
sp =3D 0;
The system then runs until the two points pLeft=5Btop-of-stack=5D and
pRight=5Btop-of-stack=5D are within 1 pixel.
This is fairly complicated code. The the 'diameter' stuff is probably not=
important to you, so try to ignore it.
Q: What kind of implementation are you trying to do?