Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Point rotation

    SDK Help
    0
    3
    414
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi,
      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?
      Thanks.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        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... 🙂

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post