POV-Ray : Newsgroups : povray.advanced-users : Volume-preserving blob : Re: Volume-preserving blob Server Time
29 Jul 2024 12:21:31 EDT (-0400)
  Re: Volume-preserving blob  
From: Christopher James Huff
Date: 14 Oct 2002 12:17:35
Message: <chrishuff-1811D2.12123714102002@netplex.aussie.org>
In article <3daa35f2$1@news.povray.org>, "Slime" <slm### [at] slimelandcom> 
wrote:

> Uh, this polynomial doesn't elliminate second derivative discontinuities.
> It's the same one currently used for the noise function in POV-Ray. The
> second derivative at zero is 6, and the second derivative at 1 is -6.

Copy/paste error. I thought that looked wrong, but forgot to go back and 
check it out...that is the one used in the old noise function, the 
correct one is:
#declare scurve = function (r) {6*pow(r, 5) - 15*pow(r, 4) + 10*pow(r, 
3)}

This will also work, and may be faster in C, though probably not for POV 
functions:
#declare scurve = function (r) {((6*r - 15)*r + 10)*r*r*r}

It is bounded, making it more controllable and possible to optimize, and 
seems to do fine at eliminating visible discontinuities.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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