POV-Ray : Newsgroups : povray.text.scene-files : Box or isosurface ? : Re: Box or isosurface ? Server Time
28 Jul 2024 18:12:20 EDT (-0400)
  Re: Box or isosurface ?  
From: Ron Parker
Date: 29 Sep 1999 13:14:36
Message: <37f248fc@news.povray.org>
On Wed, 29 Sep 1999 18:23:51 +0200, Rico wrote:
>Hi all,
>
>I would like to know if it's possible to define a box as an isosurface ?
>
>In other words, is it possible to create realistic bricks with boxed
>isosurfaces and some "noise" (granite for example) ?

Try this:

#declare c1=<-2,-1,-3>;
#declare c2=<1,3,2>;
#declare x1 = c1.x;
#declare y1 = c1.y;
#declare z1 = c1.z;
#declare x2 = c2.x;
#declare y2 = c2.y;
#declare z2 = c2.z;

isosurface {
  function {((x-x1)*(x-x2))&((z-z1)*(z-z2))&((y-y1)*(y-y2)) + 
            .2*noise3d(5*x,5*y,5*z)}
  threshold 0
  bounded_by { box {-5,5}}

  texture {
    pigment {color rgb 1}
    finish {diffuse .5 specular .3 ambient .2 roughness .001}
  }
}

light_source { <-20,20,-20> rgb <1,.8,.8>}
light_source { <20,20,-20> rgb <.8,.8,1>}
camera {location <2,5,-12> look_at 0 }


Post a reply to this message

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