>
> 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 how
> 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 how
> 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. Looking
at the code:

    int x1 = p1.x, y1 = p1.y, z1 = p1.z;
    int x2 = p2.x, y2 = p2.y, z2 = p2.z;
    int xT1 = ((x2 - p0.x) * tension) / 8;
    int yT1 = ((y2 - p0.y) * tension) / 8;
    int zT1 = ((z2 - p0.z) * tension) / 8;
    int xT2 = ((p3.x - x1) * tension) / 8;
    int yT2 = ((p3.y - y1) * tension) / 8;
    int zT2 = ((p3.z - z1) * tension) / 8;

So, T1 == (xT1, yT1, zT1) and T2 == (xT2, yT2, zT2)

T1 = P2 - P0
T2 = P3 - P1

The 'tension' factor is just a number 0-8 that controls the magnitude of
those vectors.


Miguel


-----
Open Source Molecular Visualization
www.jmol.org
[EMAIL PROTECTED]
-----



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to