POV-Ray : Newsgroups : povray.advanced-users : Isosurface planets : Re: Isosurface planets Server Time
29 Jul 2024 10:27:45 EDT (-0400)
  Re: Isosurface planets  
From: Mike Williams
Date: 29 Jul 2002 01:43:33
Message: <Yf896CAwUNR9EwXw@econym.demon.co.uk>
Wasn't it Rohan Bernett who wrote:
>I made a planet using an isosurface using f_sphere and f_noise3d, and the
>resulting ball was smaller than the radius of the sphere specified in the
>function. As more levels of noise were added, the ball became smaller
>still.
>
>The function I used was something like this:
>function{
>f_sphere(x,y,z,6400000)+100000*f_noise3d(x/100000,y/100000,z/100000)}
>
>Any ideas on why this happens, or how to get around it?

That's exactly what you should expect.

Each time you add some noise, the value of the function at any
particular point increases, so the location where the value of the
function is equal to the threshold moves inwards.

One way to fix this would be to increase the value of "threshold" to
allow for the average value of the noise function. The
"+100000*f_noise3d(..." adds an average of 50000 to the value of the
function, so set "threshold 50000".

Another way to do it is to replace the calls to f_noise3d() by
0.5*f_snoise3d(). f_snoise3d() returns noise values in the range [-1,1]
instead of [0,1] so the average value of noise added is zero.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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