POV-Ray : Newsgroups : povray.general : Double union{ difference{ problem : Double union{ difference{ problem Server Time
29 Jul 2024 08:18:54 EDT (-0400)
  Double union{ difference{ problem  
From: bluestar
Date: 20 Apr 2012 14:05:00
Message: <web.4f91a4173d42deb63f3b2c70@news.povray.org>
I have built a cube with a spherical void inside. I am having difficulty cutting
away a slice of the cube to expose the inner spherical void. I first included

work. Then I just built the cube and sphere and then later tried to add the

Here is the code I am working with:

//============================  box
#declare blackbox =
 union {
 difference {

    box { <0,0,0>, <8,8,8>      // Outside box
        pigment{ color rgb <1,0,0> *2 }
        scale < 1,1,1>  * 1
        rotate  < 0,0,0>
        translate < -4,0,-4>
       }
  }
    sphere { <0,0,0>, 4       //Inside sphere
        pigment{ color rgb <1,1,1> *2}
        scale < 1,1,1>  * 1
        rotate  < 0,0,0>
        translate < 0,4,0>
       }
  }

//============================  plane
#declare sliceplane =
   box { <0,0,0>, <6,12,12>   // slice plane
       pigment { color rgb <1,1,1> * 1}
       scale < 1,1,1>  * 1
       rotate  < -75,-25,0>
       translate < -6,-1,-3>
      }

union { difference { object {blackbox} }  object{sliceplane}}


Post a reply to this message

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