POV-Ray : Newsgroups : povray.general : Smooth spline curve : Re: Smooth spline curve Server Time
30 Jul 2024 10:12:32 EDT (-0400)
  Re: Smooth spline curve  
From: Kenneth
Date: 6 Mar 2009 13:15:00
Message: <web.49b16737e24f50f3f50167bc0@news.povray.org>
"twister" <twi### [at] o2pl> wrote:

> #macro createSpline(arr, stype, displacement, middlePoint)
>   #local arrSize = dimension_size(arr,1);
.......

I am working on a spline-generating macro too, so your question is an
interesting one. (I never actually tried to change the spline-type *during* the
spline--I guess I assumed that it would create the very problem you are trying
to work around. But it's an interesting idea.)

Just so that I understand your question correctly: When you switch between a
linear_spline type (for a non-curving straight line) and one of the non-linear
spline types (for an actual curve), are you trying to *minimize* the curve
transition there, or *maximize* it? Or are you trying to simply make the spline
curve *exactly* match the values and spline types you give it, at those
particular spline points? (In which case, clipka's explanation of the problem
is a good one.)

BTW, I only occasionally work with macros, so I'm still learning the finer
points of how to construct them. Before commenting further, I want to make sure
I understand your macro code itself.  Is dimension_size another macro of some
kind, that you are plugging in?  If so, does it return just a single value?

Ken W.


Post a reply to this message

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