POV-Ray : Newsgroups : povray.general : Help me with Iso-Surface : Re: Help me with Iso-Surface Server Time
15 Nov 2024 01:15:51 EST (-0500)
  Re: Help me with Iso-Surface  
From: Thomas Willhalm
Date: 15 Apr 1999 08:34:28
Message: <qqmemlmdsn0.fsf@goldach.fmi.uni-konstanz.de>
"Chris Capel" <chr### [at] hotmailcom> writes:

> This would help, except that I can not for my life figure out how to use the
> noise3d function in conjunction with the rounded_box function.  Could you
> perhaps give an example of this?

Hmmm. There is a problem that didn't see previously: The rounded_box
function uses the bounding box to determine its size. That's why the
combination with noise3d isn't straight forward.

It is however simple to redefine the superquadric ellipsoid with
the isosurface patch. This function can than be modified. An example
of a stone is given below.

Thomas


// ---------------------------- start pov scene ----------------------------
camera { location<15,40,-35>  direction<0,0,5.5> look_at<0,0,0>}

light_source {<-50, 40, -20> color <1,1,1>}
light_source {<  0, 50, -50> color <1,1,1>}
background {color <0.65,0.72,0.72>}

#declare P0=0.2
#declare P1=0.2
#declare BOX = function { ( abs(x)^(2/P0) + abs(y)^(2/P0) ) ^ (P0/P1)
  + abs(z)^(2/P1) - 1}

#declare RUSTY_BOX =
    function{ BOX(x,y,z) + 0.2*noise3d(40*x,40*y,40*z) }

isosurface {
  function { RUSTY_BOX }
  bounded_by{ box {<-1.1, -1.1, -1.1>, <1.1, 1.1, 1.1>}} 
  eval
  threshold  0.18
  method 2
  pigment {colour <0.65,0.3,0.1>}
  finish {ambient 0.3}
  scale 3
}
// ---------------------------- end pov scene ----------------------------


-- 
http://www.fmi.uni-konstanz.de/~willhalm


Post a reply to this message

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