|
![](/i/fill.gif) |
That looks like the first incarnation I had. The problem here is that the
number of control points on the reference spline can become rather unwieldy
with high degrees of accuracy. I'm using a modified min/max search to find
where the error is highest (+/-) on the original spline and only adding
points there. The result is that you have to make several passes, but it
doesn't waste time computing points where it doesn't need to. This also
allows you to set a threshold ... if the error isn't higher than the mean
(or whatever other threshold value), then don't add a point. I'm working on
adjustable optimizations right now, so you can prioritize between speed,
accuracy, and number of points.
Christopher Johnson
news:qr7aeugkvt07m6obnchs3hben663jbnkit@4ax.com...
> On Fri, 17 May 2002 11:18:10 -0400, "Christopher Johnson"
> <age### [at] hotmail com> wrote:
>
> If I understand it correctly it is similiar to my idea. Look below:
>
> #macro Spline_With_Linear_Movement(Spline,Min,Max,Accuracy)
> spline{
> #local Last=Spline(Min);
> #local Length=0;
> #local C=Min;
> #while (C<=Max)
> #local C=min(C,Max);
> #local Point=Spline(C);
> #local Length=Length+vlength(Point-Last);
> Length , Point
> #local C=C+Accuracy;
> #end
> }
> #end
>
> #macro Time_To_Length_Converter(Spline,Min,Max,Accuracy)
> #local Conversion=function{spline{
> #local Last=Spline(Min);
> #local Length=0;
> #local C=Min;
> #while (C<=Max)
> #local C=min(C,Max);
> #local Point=Spline(C);
> #local Length=Length+vlength(Point-Last);
> C , Length
> #local C=C+Accuracy;
> #end
> }};
> function(T){Conversion(T).x}
> #end
>
> ABX
Post a reply to this message
|
![](/i/fill.gif) |