POV-Ray : Newsgroups : povray.general : Re: isosurface landscapes Server Time
14 Nov 2024 21:14:46 EST (-0500)
  Re: isosurface landscapes (Message 1 to 1 of 1)  
From: Mike Williams
Subject: Re: isosurface landscapes
Date: 4 Feb 2005 03:01:54
Message: <AM+IPGA7tyACFwzB@econym.demon.co.uk>
Wasn't it Bryan Valencia who wrote:
>I have been playing with this, and am having trouble with a 3
>levels-of-detail iso landscape.
>
>I'm using a marble function to do large features like canyons and mountains,
>a noise function to do dunes, and a granite function to do 'grain'.
>
>The main problem I'm encountering is that I can't get large features large
>enough.  My mountains are all exactly 20 feet tall.
>
>I am really getting tired of rendering 10000x10000 images to use for height
>fields. I'd love to figger this isosurface thing out.
>
>Is there a way to use a function to do something like this?
>
>- Start with f_marble
>- Scale they Y by 'distance from x=0,z=0'.  So there would be this little
>valley in the center and the mountains would be around the outside.
>
>I tried using f_myMarble(x/100,y/100,z/100)*1000 but no go.

That just changes the scale (see
<http://www.econym.demon.co.uk/isotut/substitute.htm#scale>)

What you need to do is multiply the f_myMarble(x,0,z) expression by
something that depends on the distance from the origin. That distance is 
        pow(x*x+z*z,0.5)
So use something like
        isosurface {
          function { y
             - f_myMarble(x,0,z) * Height * pow(x*x+z*z,0.5)
        }

The power 0.5 gives a V shaped cross section. Higher values give a U
shaped cross section.

To adjust the width of the valley, apply a scaling factor like this:
        pow((x*x+z*z)*Width*Width, 0.5)

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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