THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/01/2003 at 08:55, xxxxxxxx wrote:
Cinema 4D Version: 8.012
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
I have 3 points (P1, P2 and A). They are lying in one plane, but not
along a world axis.
P2 should be rotated around A that vector P2-A ist pointing in the
same direction like vector P1-A. I have the rotation axis and can
calculate the angle. But I don´t know the direction of the rotation
(angle is always positive). Is there a formula to get this right?
On 29/01/2003 at 14:43, xxxxxxxx wrote:
I assume you want a transformation so that you can rotate other points as well. (Otherwise just assign P2 = A + vnorm(P1 - A) * P2.)
What you could do is to get the rotation axis by the cross product "vcross(P2-A, P1-A)". Then the rotation axis together with the angle given by asin(vlen(vc)) will always rotate P2 to P1. (I think...
On 03/02/2003 at 05:32, xxxxxxxx wrote:
Thanks. This works once again :).
But what to do if i want to get the average angle between two polys. I´m trying to rotate one poly (in one plane) so that it´s edges are aligned to the edges of another poly. I can calculate the angles between all edges, but how do I put them together? Adding the edges(vectors) of each poly and taking the cross product didn´t do the job.
Thanks in advance.