





 
 




 
 


I know how Spline works for two points, but how can we create a smooth line of
spheres passing through n points? I am looking for something like line smoothing
in graphs/charts.
I assume we have to create n1 Splines, but how do we calculate the control
points to have a smooth curvature over points?
In the tutorial on Bezier patches, there is an explanation for aligning the
control points for Bezier surfaces, but I am not sure if we need to apply the
same approach here.
Post a reply to this message


 
 




 
 


"Kima" <nomail@nomail> wrote:
> In the tutorial on Bezier patches, there is an explanation for aligning the
> control points for Bezier surfaces, but I am not sure if we need to apply the
> same approach here.
For interpolation between points I would not use a Bezier spline as there are
many ways to position the handles/control points. Use one of quadratic_spline,
cubic_spline, natural_spline or one from my curve macro's
https://ingoogni.nl/download/ There is also the Interpolate macro in math.inc
that does cosine interpolation or exponential interpolation.
ingo
Post a reply to this message


 
 




 
 


"ingo" <nomail@nomail> wrote:
>
> For interpolation between points I would not use a Bezier spline as there are
> many ways to position the handles/control points. Use one of quadratic_spline,
> cubic_spline, natural_spline or one from my curve macro's
> https://ingoogni.nl/download/ There is also the Interpolate macro in math.inc
> that does cosine interpolation or exponential interpolation.
>
> ingo
WOW! Your collection of spline macros is quite something. I will use them.
Thanks for sharing :)
Post a reply to this message


 
 


From: Josh English
Subject: Re: Macro for connecting n points through Spline
Date: 20 Apr 2023 16:40:08
Message: <6441a328$1@news.povray.org>



 
 


On 4/20/2023 3:47 AM, Kima wrote:
> I know how Spline works for two points, but how can we create a smooth line of
> spheres passing through n points? I am looking for something like line smoothing
> in graphs/charts.
>
> I assume we have to create n1 Splines, but how do we calculate the control
> points to have a smooth curvature over points?
>
> In the tutorial on Bezier patches, there is an explanation for aligning the
> control points for Bezier surfaces, but I am not sure if we need to apply the
> same approach here.
>
My bez.inc file has several functions to do this.
https://www.joshuarenglish.com/povray/bez.html
Post a reply to this message


 
 




 
 


"Kima" <nomail@nomail> wrote:
> I know how Spline works for two points, but how can we create a smooth line of
> spheres passing through n points? I am looking for something like line smoothing
> in graphs/charts.
>
> I assume we have to create n1 Splines, but how do we calculate the control
> points to have a smooth curvature over points?
>
> In the tutorial on Bezier patches, there is an explanation for aligning the
> control points for Bezier surfaces, but I am not sure if we need to apply the
> same approach here.
You need to make sure that the control points 1in from the end of each spline
segment is on the same line, so that the endpoints are tangent. IIRC, that is
covered in the documentation somewhere.
https://www.youtube.com/watch?v=jvPPXbo87ds&pp=ygUNZnJleWEgc3BsaW5lcw%3D%3D
I also have a PDF that covers this specifically for POVRay
 BW
Post a reply to this message


 
 




 
 


Thanks for all the tips. It is embarrassing, but I must admit as it may help
someone else. I knew I had used it a long time ago but stupidly forgot it.
I was looking for "sphere_sweep"!
It is funny that people have encountered all sorts of problems in the long
history of POVRay, and we often try in vain to reinvent the wheel :)
Post a reply to this message


 
 




 