Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keeping a fixed spline length
#1
Hi there,

Let's say I have a spline with several control points. I would like to be able to move those control points by small amounts but keep the spline at a constant length (during runtime).

I'm fine with moving the control points etc but the spline "stretches" of course when the points are moved. I guess my question is:

1. Is there a way to "set" the length of a spline? How would I calculate where one of the end control points needs to be so that the spline length was a certain value?

Thank you for any help you can provide.

John
Reply
#2
Hi
There is no feature in Curvy Splines that allows that.
There might be mathematical ways (that could then be implemented in C#) to extend/shrink a spline by a specific length. I can't say for sure, I have never searched for this seriously. If this exists, it surely will not be applicable the same way on all the spline types Curvy Spline handles, so you have to search for the type of splines your project is using.
I hope this helped.
Have a nice day.
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
Ok thank you anyway.

John
Reply
#4
To maintain a constant spline length while adjusting control points, you can use a numerical method. Implement an algorithm that adjusts the positions of control points iteratively, ensuring the spline length matches your desired value. Utilize techniques like gradient descent or Newton's method to update control point positions based on length constraints.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Method of scattering objects along spline joebain 1 3 11-26-2024, 03:20 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 5 13 10-29-2024, 10:19 AM
Last Post: _Aka_
  Nested Spline Volume Spot Instantiation merobbins5 3 7 07-26-2024, 09:58 AM
Last Post: _Aka_
  Left-right movement, and spline follow shihaya 3 10 07-12-2024, 12:50 PM
Last Post: _Aka_

Forum Jump: