|
![](/i/fill.gif) |
> From: "Mahalis" <don### [at] fakey com>
> Newsgroups: povray.binaries.images
> Date: Tue, 23 Oct 2001 19:30:19 -0400
> Subject: Re: something for ya...
>
> Kewl- nice lighting, excellent textures, yada yada... :-) How'd you do the
> domino floor?
here's the source (or part of it anyways):
//--------------------- source starts here
#declare boxWide = 5;
#declare boxTall = .5;
#declare cutOutWide = boxWide*.85;
#declare cutOutThick = boxTall*.25;
#local theHole = boxWide*.5;
#declare cutOut =
union {
cylinder { x* cutOutWide, -x* cutOutWide, cutOutThick }
sphere { x* cutOutWide, cutOutThick }
translate y*boxTall
}
#declare One =
torus { cutOutWide*.25, cutOutThick translate y*boxTall }
#declare Two =
union {
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate
<-theHole,boxTall,-theHole> }
}
#declare Three =
union {
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate
<-theHole,boxTall,-theHole> }
torus { cutOutWide*.25, cutOutThick translate y*boxTall }
}
#declare Four =
union {
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate
<-theHole,boxTall,-theHole> }
torus { cutOutWide*.25, cutOutThick translate <-theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,-theHole>
}
}
#declare Five =
union {
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate
<-theHole,boxTall,-theHole> }
torus { cutOutWide*.25, cutOutThick translate <-theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,-theHole>
}
torus { cutOutWide*.25, cutOutThick translate y*boxTall }
}
#declare Six =
union {
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate
<-theHole,boxTall,-theHole> }
torus { cutOutWide*.25, cutOutThick translate <-theHole,boxTall,theHole>
}
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,-theHole>
}
torus { cutOutWide*.25, cutOutThick translate <theHole,boxTall,0> }
torus { cutOutWide*.25, cutOutThick translate <-theHole,boxTall,0> }
}
#macro myBox()
difference {
box {
<-boxWide,-boxTall,-boxWide >,< boxWide,boxTall,boxWide >
}
object { cutOut translate z* cutOutWide }
object { cutOut translate z* cutOutWide rotate y*90 }
object { cutOut translate z* cutOutWide rotate y*180}
object { cutOut translate z* cutOutWide rotate y*270}
#local flag = int(rand( seed13 )*6);
#switch( flag )
#case( 0 )
object { One }
#break
#case( 1 )
object { Two }
#break
#case( 2 )
object { Three }
#break
#case( 3 )
object { Four }
#break
#case( 4 )
object { Five }
#break
#case( 5 )
object { Six }
#break
#end
}
#end
//------------------------------ source ends here
... not the super-science way of doing things, but what the hell... :)
--
dan
http://hometown.aol.com/goofygrafx
Post a reply to this message
|
![](/i/fill.gif) |