|
|
I thought I understood difference, by reading the docs, but I can't get it
to work right.
here's my code.
ignore the cylinder for now
cylinder
{
<-2, 2, -2>
<2, -2, 2>
.5
pigment {color rgb 1}
}
light_source
{
<0, 0, -30>
color rgb 1
parallel
point_at 0
}
camera
{
//location <0,0,-10>
location <0,0,-30>
look_at 0
}
intersection
{
box
{
<-2, -2, -29>
<2, 2, -29>
pigment {color rgb <1,0,0>}
}
#declare Count=-2;
#while (Count<=2)
box
{
<Count, -2, -29>
<Count+.01, 2, -29>
pigment {color rgb <1,1,0>}
inverse
}
#declare Count = Count + .1;
#end
}
What I want is a plane (a square actually) with stripes of *nothing* (of
width .01) going through it. What I get is stripes of yellow (the color of
the objects i'm trying to subtract from the square).
I said difference, but i'm using intersection. that's because when
difference didn't work as i expected i switched to intersection using the
'inverse' keyword, which the docs said is equivalent -- and i get the same
result as when i used difference.
Post a reply to this message
|
|
|
|
Firstly, if you want to substract an object from another, they should not
have councident surfaces. That is, if you want to for example cut a hole
through a box with another box, the cutting box should be slightly
longer in the direction of the hole.
Secondly, in the resulting object the surfaces which belong to the
cutting object, ie the new surfaces which appear in the original object
due to the cutting, will be textured with the cutting object's texture.
(If you want to keep the texture of the original object in these new
surfaces you have to use cutaway_textures.)
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|