|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
bluestar <nomail@nomail> wrote:
> union { difference { object {blackbox} } object{sliceplane}}
You are creating a union of the box and the plane, rather than a
difference.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> > union { difference { object {blackbox} } object{sliceplane}}
>
> You are creating a union of the box and the plane, rather than a
> difference.
> - Warp
Hey Warp,
I tried this and got the same effect.
difference { object {blackbox} } object{sliceplane}
The above syntax was the same used to make the spherical void in the cube except
with that image I also use the preceeding union statement.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> bluestar <nomail@nomail> wrote:
> > union { difference { object {blackbox} } object{sliceplane}}
>
> You are creating a union of the box and the plane, rather than a
> difference.
>
> --
> - Warp
Hey Warp
I dropped the union{ statement and got the same effect.
difference { object {blackbox} } object{sliceplane}
This syntax is the same I used to create the spherical void in the cube except
then I included the union{ statement. In this case I am unclear what is wrong.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
bluestar <nomail@nomail> wrote:
> Hey Warp,
> I tried this and got the same effect.
> difference { object {blackbox} } object{sliceplane}
Now you are creating two separate objects with no connection to each
other.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> bluestar <nomail@nomail> wrote:
> > Hey Warp,
> > I tried this and got the same effect.
> > difference { object {blackbox} } object{sliceplane}
> Now you are creating two separate objects with no connection to each
> other.
Ok, I'll stop being so mean. Try this:
difference
{
object { blackbox }
object { sliceplane }
}
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> bluestar <nomail@nomail> wrote:
> > Hey Warp,
> > I tried this and got the same effect.
>
> > difference { object {blackbox} } object{sliceplane}
>
> Now you are creating two separate objects with no connection to each
> other.
>
> --
> - Warp
OK,ok I got it.
This chopped off the box. Wrong side, but I'll fix that.
difference { object {blackbox} object{sliceplane} }
Also noticed the sphere void was not present, so I'll check syntax on that
object as well.
Also, I will seperate out all obects and will try the following to see if it
works.
difference { object {blackbox} object{spherevoid} object{sliceplane} }
or the second half may need to be in brackets
difference { object {blackbox} {object{spherevoid} object{sliceplane}} }
Hey Warp, thanks for the nudges, much appreciated!!!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Warp<war### [at] tagpovrayorg> wrote:
>> bluestar<nomail@nomail> wrote:
>>> Hey Warp,
>>> I tried this and got the same effect.
>>
>>> difference { object {blackbox} } object{sliceplane}
>>
>> Now you are creating two separate objects with no connection to each
>> other.
>>
>> --
>> - Warp
>
> OK,ok I got it.
> This chopped off the box. Wrong side, but I'll fix that.
>
> difference { object {blackbox} object{sliceplane} }
Simple, just negate the plane's normal.
plane{y,0} becomes plane{-y,0}
If the plane ton't pass through the origin, like this:
plane{y, 10}, then you need to also negate the distance like this:
plane{-y, -10}
You can also use inverse.
>
> Also noticed the sphere void was not present, so I'll check syntax on that
> object as well.
>
> Also, I will seperate out all obects and will try the following to see if it
> works.
>
> difference { object {blackbox} object{spherevoid} object{sliceplane} }
This construction is OK
You start with the base object, then you remove the sphere and the plane.
>
> or the second half may need to be in brackets
>
> difference { object {blackbox} {object{spherevoid} object{sliceplane}} }
This one is not, at least, it's not recomended...
>
> Hey Warp, thanks for the nudges, much appreciated!!!
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|