POV-Ray : Newsgroups : povray.newusers : Length of spline object changes during animation : Re: Length of spline object changes during animation Server Time 8 Feb 2023 09:47:09 EST (-0500)
 Re: Length of spline object changes during animation
 From: Bald Eagle Date: 19 Sep 2022 07:20:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.63284fee70f1e1be1f9dae3025979125%40news.povray.org",
"headline": "Re: Length of spline object changes during animation",
"dateCreated": "2022-09-19T11:20:00+00:00",
"datePublished": "2022-09-19T11:20:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
"Aj" <nomail@nomail> wrote:

> Thank you for taking the time to go through the problem.
> So basically the < x, y, z > coordinates are coming from a numerically simulated
> soft robot and the entire shape of the robot changes over time. So I was trying
> to create a spline through these points that move in the 3d space. I agree that
> the splines will be of different lengths depending on the location of control
> points but this is what I am trying to fix. As the spline represents a soft
> robot that is capable of only changing its shape keeping the length constant.
> I hope this clears some of your doubts.

The problem here is that you need to be able to create a smooth spline that you
can calculate the length of.  And Cousin Ricky will tell you that calculating
the length of many mathematical curves with some sort of implicit or parametric
equation is - impossible.

What you'd probably need to do is find some numeric method to approximate the
length based on linear line segments (or just use a linear spline).  Then you'd
need a way to take the soft-robot control points and iteratively adjust their
positions so that they converge to a spline with a fixed length, while still
maintaining the overall correct pose of the character.

This is a raytracing forum, and the experience and expertise of the people here
is pretty random.
I would suggest that you take a good while to research approximating
curve/spline lengths, and contact people whose expertise this is.   There are