> > this snippet code taken form Hermite3d what are > p0,p1,p2,p3
the curve is drawn between p1 and p2 p0 and p3 provide tangent information. > and > 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' see: http://www.cubic.org/docs/hermite.htm > 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[0] = 0; pLeft[0].set(p1); sRight[0] = 1; pRight[0].set(p2); sp = 0; The system then runs until the two points pLeft[top-of-stack] and pRight[top-of-stack] 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? Miguel ------------------------------------------------------- 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
