POV-Ray : Newsgroups : povray.text.scene-files : Box or isosurface ? Server Time
25 Dec 2024 00:20:20 EST (-0500)
  Box or isosurface ? (Message 1 to 3 of 3)  
From: Rico
Subject: Box or isosurface ?
Date: 29 Sep 1999 12:23:43
Message: <37F23D17.E7D2A608@hotmail.com>
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) ?

Rico.


Post a reply to this message

From: Ron Parker
Subject: Re: Box or isosurface ?
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

From: Rico
Subject: Re: Box or isosurface ?
Date: 29 Sep 1999 14:29:24
Message: <37F25A8C.93648C12@hotmail.com>
Don't have the time to test it now, but thank you very much. :-)

Rico.


Post a reply to this message

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