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.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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
  Filling a closed spline dynamically rickgplus 1 244 04-16-2025, 08:56 AM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 297 02-03-2025, 09:34 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 1,134 01-20-2025, 12:25 PM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 549 01-02-2025, 09:58 AM
Last Post: _Aka_

Forum Jump: