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
    • Recent
    • Tags
    • Users
    • Login

    CalcSplineV [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 511 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

      On 07/04/2015 at 13:44, xxxxxxxx wrote:

      Is there a way to change the type of spline that is calculated with c4d._<_gs_<_gs_>_gs>_/gs>_rk">.CalcSplineV. Currently it seems that it uses a Bezier interpolation?

      EDIT:

      Here is some code. Python tag _WARE_mark">on a null with a float slider user data.

      _FTWARE_mark">def _SOFTWARE_mark">main() :
          obj = op.GetObject()
          Pos = obj[c4d.ID_USERDATA,1]
          
          SL = [c4d.Vector(-200,0,0),c4d.Vector(-100,0,100),c4d.Vector(0,0,0),c4d.Vector(-100,0,-100)]
          
          Spot = c4d.utils.CalcSplineV(Pos, SL)
          
          _78c6-69b1-40a8-9818-76d76b09a739" ="GINGER_SOFTWARE_mark">obj_"cc0878c6-69b1-40a8-9818-76d76b09a739" ="GINGER_SOFTWARE_mark">[c4d.ID_BASEOBJECT_REL_POSITION] = Spot
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 08/04/2015 at 07:45, xxxxxxxx wrote:

        Hi ShawnFrueh,

        Sorry, there's no way to change the equation it uses within c4d.utils.CalcSplineV() to change the type of spline that is calculated.  I'm curious to know what you'd rather it do?  In any case, you'd have to code whatever replacement algorithm you prefer and use the raw data you created to calculate what you want.

        Joey Gaspe
        SDK Support Engineer

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

          On 08/04/2015 at 09:16, xxxxxxxx wrote:

          Thanks for the info Joey.

          I would like it to be able to use the different types of spline interpolation that Cinema offers. Do you happen to know the type of algorithm CalcSplineV(_<_gs_>_) uses?

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

            On 09/04/2015 at 08:40, xxxxxxxx wrote:

            Hi Shawn,

            Sorry, we're generally not allowed to divulge how Cinema 4D implements its features in public, especially in terms of algorithms, as it's not always clear what would be harmless or turn out to be a leaked secret or clue to an overall secret.

            All I can say is that you'll have to test the different types of interpolation that C4D offers and choose the one that best fits your needs.

            Joey Gaspe
            SDK Support Engineer

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

              On 09/04/2015 at 09:28, xxxxxxxx wrote:

              No problem. It never hurts to go learn some new math 🙂

              Thanks for replying.

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

                On 09/04/2015 at 09:56, xxxxxxxx wrote:

                OK, I'll tag the topic as solved.

                Joey Gaspe
                SDK Support Engineer

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