|
![](/i/fill.gif) |
In article <3daa35f2$1@news.povray.org>, "Slime" <slm### [at] slimeland com>
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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |