|
|
Wasn't it James who wrote:
>Hi!
>
>I am trying to make 3D box only with frames (black). This is not
>transparent. Only, I want to make 3D Box frames with black lines.
>
>I have tried to use BOX function and then to erase the aress in six
>rectangulars, however, I count not do that.
You can do it like this by creating a box and then removing the middle
bits
#macro Boxframe(P1,P2,D)
difference {
box {P1,P2}
box {P1+<D,D,-D>, P2-<D,D,-D>}
box {P1+<-D,D,D>, P2-<-D,D,D>}
box {P1+<D,-D,D>, P2-<D,-D,D>}
}
#end
object {Boxframe(<-2,-1,-1>,<2,1,1>,0.05) pigment {rgb 0}}
(This macro assumes that each coordinate of the first control point is
less than the equivalent coordinate of the second point second point)
or you can do it by drawing in the eight separate edges, like this
#macro Framebox(P1,P2,D)
union {
cylinder {<P1.x,P1.y,P1.z>,<P2.x,P1.y,P1.z>,D}
cylinder {<P1.x,P1.y,P1.z>,<P1.x,P2.y,P1.z>,D}
cylinder {<P1.x,P1.y,P1.z>,<P1.x,P1.y,P2.z>,D}
cylinder {<P2.x,P1.y,P1.z>,<P2.x,P2.y,P1.z>,D}
cylinder {<P2.x,P1.y,P1.z>,<P2.x,P1.y,P2.z>,D}
cylinder {<P2.x,P2.y,P1.z>,<P2.x,P2.y,P2.z>,D}
cylinder {<P2.x,P2.y,P1.z>,<P1.x,P2.y,P1.z>,D}
cylinder {<P1.x,P1.y,P2.z>,<P2.x,P1.y,P2.z>,D}
cylinder {<P1.x,P1.y,P2.z>,<P1.x,P2.y,P2.z>,D}
cylinder {<P1.x,P2.y,P2.z>,<P2.x,P2.y,P2.z>,D}
cylinder {<P1.x,P2.y,P2.z>,<P1.x,P2.y,P1.z>,D}
cylinder {<P2.x,P1.y,P2.z>,<P2.x,P2.y,P2.z>,D}
}
#end
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|