POV-Ray : Newsgroups : povray.binaries.images : BoxBlob (40kb before upload) : Re: BoxBlob (40kb before upload) Server Time
3 Oct 2024 21:20:01 EDT (-0400)
  Re: BoxBlob (40kb before upload)  
From: Ron Parker
Date: 7 Oct 1999 10:06:31
Message: <37fca8e7@news.povray.org>
On Wed, 06 Oct 1999 19:28:56 -0700, SamuelT. wrote:
>Way to go! I'm sitting here trying to figure out how to do it myself. My idea was
>to put all the boxes like this:
>
>((box)|(box)|(box)|(box))
>
>and then multiply the torus to it afterward. 

Here's one that works nicely, I think.  It has a "seam" at the planes
where abs(x)=abs(y) but I'm not sure if there's anything I can do about
that.  It's due to the maxes and mins.  I'd post an image, but I don't
have anything here to convert it to jpg with.

#declare x1=-4; #declare x2=-2; #declare x3=-1;
#declare x4=1;  #declare x5=2;  #declare x6=4;
#declare y1=-4; #declare y2=-2; #declare y3=-1;
#declare y4=1;  #declare y5=2;  #declare y6=4; 
#declare z1=-1; #declare z2=1;
          
isosurface {
  function { max((z-z1)*(z-z2),
             min(max((y-y1)*(y-y2)*(y-y5)*(y-y6),(x-x3)*(x-x4)),
                 max((x-x1)*(x-x2)*(x-x5)*(x-x6),(y-y3)*(y-y4)))) *
            (z*z + sqr(sqrt(x*x+y*y)-3)-.25)}

  threshold .1
  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.