POV-Ray : Newsgroups : povray.binaries.images : Is there a spline solution out there? : Re: Cubic spline mentioned above 18kbbu Server Time
1 Oct 2024 22:24:01 EDT (-0400)
  Re: Cubic spline mentioned above 18kbbu  
From: Anton Sherwood
Date: 12 Aug 2000 20:44:14
Message: <3995F0FB.254EACFA@pobox.com>
"Greg M. Johnson" wrote:
> This is actually supposed to be the rotation of a knee across a walk cycle.

Does a knee really bend to 125 degrees in walking?

> In your solution, which is very similar to mine, the knee would be bending
> backwards (theta>>0) during part of the cycle.  If you look at my solution
> in the blue curve that I posted, it is devoid of the above error, but so flat
> it is not much  better than straight lines.

Wish you'd said in the first place that you want the spline to stay
below zero.
One way to do that is to square some function that crosses the axis in
the segment where you want tangency.  Thus, for the segment 0.50 < t <
0.75, we take y=square(4*(t-1/2)*(sqrt(25)-sqrt(10))-sqrt(10)).  Then
spline the remaining segments to match the slopes of this parabola.

Of course you could fit a periodic function to
	0.00	sqrt(15)
	0.25	sqrt(125)
	0.45	sqrt(110)
	0.50	sqrt(10)
	0.75	-sqrt(25)
	1.00	-sqrt(15)
	1.25	-sqrt(125)
	1.45	-sqrt(110)
	1.50	-sqrt(10)
	1.75	sqrt(25)
	2.00	sqrt(15)
(where the left column is multiples of pi), square that, and use it at
half frequency.

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.