POV-Ray : Newsgroups : povray.off-topic : Interpolation of 2D points : Re: Interpolation of 2D points Server Time
28 Jul 2024 10:24:53 EDT (-0400)
  Re: Interpolation of 2D points  
From: Lars Rohwedder
Date: 11 Sep 2014 06:08:58
Message: <541174ba$1@news.povray.org>
> Splines is the way to go. Now, there is more than a single solution,
> even for splines which match their input points (yep, some kinds do
> not).

I know that. :-/

> Do you want it simple, or with C2 continuity (speed is continuous
> too), or even C4 continuity (acceleration is also continuous)?
> (in regard to t's derivatives)

That depends on how complicate the formulae become.

At the moment I implemented a simple linear interpolation, so I got
straig lines between the points. The "edges" are pretty visible in the
animation, so a bit more "smoothiness" would be nice. So I'd try
quadratic splines at next?

> Basically, from the list of {t, point} you get a sequence of segments
> and for each segment some coefficients are computed based on the
> around points and t values. (from 2 to 4 points are used).

That's already true for linear interpolation.

> (notice that the coordinates of the points are independent on the
> spline: only t and a selected axis influences the value along that
> axis)

So I can calculate the interpolation for each axis independently?

> The hard part is of course the computation of the coefficients.

ACK. :-/

Thanks so far for your answer.

Lars R.


Post a reply to this message

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