POV-Ray : Newsgroups : povray.text.tutorials : Isosurface tutorial : Re: Isosurface tutorial Server Time
2 May 2024 15:04:01 EDT (-0400)
  Re: Isosurface tutorial  
From: Chris Huff
Date: 6 Apr 2000 11:37:41
Message: <chrishuff_99-89E2D8.10401006042000@news.povray.org>
In article <38EBF909.A986DE48@hotmail.com>, Pabs <pab### [at] hotmailcom> 
wrote:

> You wouldn't happen to know anything about isosurface heightfeilds BTW.

Start with a plane and a pigment function:
#declare CrackleFn =
function {
    pigment {crackle ramp_wave
        color_map {[0 rgb 0][1 rgb 1]}
    }
}
function {y}

And subtract the pigment function from the plane function, so it is 
raised depending on the value of the pigment. There are two ways to do 
this, one which allows overhangs and separated pieces of the height 
field(because it makes the pattern function dependant on y):
function {y - CrackleFn(x,y,z)}

and one which behaves like the usual height field, with no overhangs:
function {y - CrackleFn(x,0,z)}

In the isosurface, use a threshold of 0 and bound with a box from 
<0,0,0> to <1,1,1> if you want to make a direct substitution for a 
height_field primative.
isosurface {
    function {y - CrackleFn(x,0,z)}
    threshold 0
    eval
    contained_by {box {<0,0,0>, <1,1,1>}}
}

-- 
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

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