Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Get Spline curve angle for auto-banking

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 595 Views
    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 Offline
      Helper
      last edited by

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

      On 11/11/2007 at 22:57, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.1 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,

      I want to implement auto-banking for objects that are aligned to a spline.

      I tried the method I found on base80.com: Calculating the banking angle from the difference of current and last Rot.H value. But this causes problems when the value 'increases' from 359° to 0°.
      It would be better to determine the 'curve angle' of the spline for a point on the spline. But how can do this?

      Thanks for any tips & help!

      Greetings,
      Jack

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

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

        On 13/11/2007 at 02:42, xxxxxxxx wrote:

        Nobody? No idea? 😞

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

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

          On 13/11/2007 at 03:15, xxxxxxxx wrote:

          Hi Jack.
          AFAIK a "curve angle" from a point would be it's tangent but that would not be so reliable as a solid source.
          As for the flipping of a full turn (359->0 and 0->359) you can calculate the
          resulting minimum angle and use that Fortunately there is a function for it in the SDK. Look up "MinimizeAngle(a,b)" and you should be fine.

          Cheers
          Lennart

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

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

            On 13/11/2007 at 03:37, xxxxxxxx wrote:

            MinimizeAngle?? Wow, the SDK surprises me every day again 🙂
            Thanks a lot, Lennart!

            Greetings,
            Jack

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

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

              On 17/11/2007 at 05:08, xxxxxxxx wrote:

              Well, unfortunately, there is no MinimizeAngle() function in the C++ SDK. But thanks anyway.

              [EDIT]Ah, I see in C++ SDK it is called Vector GetOptimalAngle(const Vector& hpb_old, const Vector& hpb_new). Maybe I can make something out of that.[/EDIT]

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

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

                On 17/11/2007 at 11:59, xxxxxxxx wrote:

                GetOptimalAngle(), yes. 😉

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

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

                  On 18/11/2007 at 06:04, xxxxxxxx wrote:

                  Hm, somehow it twists up all my angles. Now I wrote my own function and everything works fine. Thank you guys!

                  Greetings,
                  Jack

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