>
> Hello and thanks for your reply .hermite curve are drawn b/w two points=
> and how to calculate tangent vector .if P1 is CA1 and C2 is CA2 then ho=
w
> to calculate T1 and T2
>
> To calculate a hermite curve you need the following vectors: P1: the
> startpoint of the curve T1: the tangent (e.g. direction and speed) to h=
ow
> the curve leaves the startpoint P2: he endpoint of the curve T2: the
> tangent (e.g. direction and speed) to how the curves meets the endpoint=
Per my other message ...
With this curve I calculate the tangents T1 and T2 by using the points P0=
and P4.
However, looking at the code, I realize that my other message may have
given you the wrong answer regarding how T1 and T2 are calculated. Lookin=
g
at the code:
int x1 =3D p1.x, y1 =3D p1.y, z1 =3D p1.z;
int x2 =3D p2.x, y2 =3D p2.y, z2 =3D p2.z;
int xT1 =3D ((x2  p0.x) * tension) / 8;
int yT1 =3D ((y2  p0.y) * tension) / 8;
int zT1 =3D ((z2  p0.z) * tension) / 8;
int xT2 =3D ((p3.x  x1) * tension) / 8;
int yT2 =3D ((p3.y  y1) * tension) / 8;
int zT2 =3D ((p3.z  z1) * tension) / 8;
So, T1 =3D=3D (xT1, yT1, zT1) and T2 =3D=3D (xT2, yT2, zT2)
T1 =3D P2  P0
T2 =3D P3  P1
The 'tension' factor is just a number 08 that controls the magnitude of
those vectors.
Miguel

Open Source Molecular Visualization
http://www.jmol.org
miguel=40jmol.org

