POV-Ray : Newsgroups : povray.unofficial.patches : Smooth linear splines Server Time
2 Sep 2024 10:17:47 EDT (-0400)
  Smooth linear splines (Message 1 to 6 of 6)  
From: Greg M  Johnson
Subject: Smooth linear splines
Date: 21 Mar 2000 22:05:35
Message: <38d8387f@news.povray.org>
How do I get them?

The linear spline isn't smooth.

The cubic_spline looks like an ungainly pita. Why can't the computer
figure out ways for it to be smooth on either end?

The #init_spline bombs out if I don't have my numbers "in ascending
way."


Post a reply to this message

From: Nieminen Juha
Subject: Re: Smooth linear splines
Date: 22 Mar 2000 04:29:39
Message: <38d89283@news.povray.org>
"Linear" and "smooth" are mutually exclusive terms.
  Cubic is smooth. I don't see the problem.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: Smooth linear splines
Date: 22 Mar 2000 06:29:53
Message: <chrishuff_99-D09D1E.06315822032000@news.povray.org>
In article <38d8387f@news.povray.org>, "Greg M. Johnson" 
<"gregj;-)56590\""@aol.c;-)om> wrote:

> How do I get them?
> 
> The linear spline isn't smooth.

No, it is made of straight line segments. That is the whole point of it 
being "linear". If it was smooth, it wouldn't be a linear spline. :-)


> The cubic_spline looks like an ungainly pita. Why can't the computer
> figure out ways for it to be smooth on either end?

What do you mean? Maybe you would get better results by using more 
points in the spline?


> The #init_spline bombs out if I don't have my numbers "in ascending
> way."

Could you be more specific?
And you might want to try the "other" spline patch included in MegaPOV, 
the one using this kind of syntax:
#declare MySpline = spline {...}

sphere {MySpline(Val), Radius...}

See section "5.9. Splines with clock" in the MegaPOV documentation for 
details. The documentation says "Note: argument/value pairs needn't be 
sorted by argument value.", which I assume is your problem.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Smooth linear splines
Date: 22 Mar 2000 07:43:24
Message: <38D8BEF0.D9E1E467@my-dejanews.com>
OK, the request is: how can I get a smoothly varying, one-dimensional
spline?

Linear_spline, obviously, is not smooth.

The cubic_spline requires me to figure out ways to add two extra points
before and after the range I am interested in. This is most aggravating,
especially if I want it to be smooth and don't want to have to resort to
some other software for 20 minutes to figure this out.

The #init_spline, first of all, looks like it will not tolerate a
one-dimensional spline.  I have to make up a second variable and throw
it away, or put two variables I'm interested in varying into the x, y
components of the spline.

And yes, #init_spline  bombed out with an error messare that I did not
have my numbers "in ascending way."  So it will only accept variables
where the arguments increase??

Arggh is increasing!  Help!

Greg M. Johnson wrote:

> How do I get them?
>
> The linear spline isn't smooth.
>
> The cubic_spline looks like an ungainly pita. Why can't the computer
> figure out ways for it to be smooth on either end?
>
> The #init_spline bombs out if I don't have my numbers "in ascending
> way."


Post a reply to this message

From: TonyB
Subject: Re: Smooth linear splines
Date: 22 Mar 2000 10:25:00
Message: <38d8e5cc@news.povray.org>
I'm very ignorant in this field, but what he's asking for sounds kinda like
a quadratic spline or something, so it's not linear, yet not cubic. (Damn,
that reeks logic, don't it?)


Post a reply to this message

From: Greg M  Johnson
Subject: GOT IT NEVERMIND THANKS SORRY
Date: 22 Mar 2000 13:23:07
Message: <38D90E8E.F8752BC4@my-dejanews.com>
Yes, the #init_spline is the perfect solution to my problem: keyframing
of a walk cycle.

I at first thought that the "extra variable" were a nuisance, but it's
exactly what I wanted.  Mega insists that the first variable be in
ascending order, but not the second.

#init_spline is indeed a marked advancement above the ungainly
cubic_spline!

Greg M. Johnson wrote:

> How do I get them?


Post a reply to this message

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