After reading an early draft of this chapter, Greg Albing, the fifteen-year-old son of an author's friend, crafted the following scene file:
#include "shapes.inc"
#include "colors.inc"
#include "metals.inc"
#include "woods.inc"
#include "stones2.inc"
#include "glass.inc"
#include "skies.inc"
#declare pipe = union{
cylinder{
<0,1,0>,
<0,5,0>,
0.5
open
}
cone{
<0,0,00>, 0.0
<0,1,0>, 0.5
open
}
texture { T_Chrome_2D }
}
#declare goldPipe = object{ pipe texture { T_Gold_3D }}
#declare woodPipe = object { box { <0,0,0> <1,8,1> texture { T_Wood13 }}}
#declare hornPipe = union {
cone{
<0,-1,0> 0.0
<0,-1,-3> 0.3
open
}
cone{
<0,-1,-3> 0.3
<0,-1,-4> 0.4
open
}
texture { T_Copper_4B}
}
#declare pue = union {
box{<00,2,0><8,5,1>}
box{<0,0,0><1,2,3>}
box{<7,0,0><8,2,3>}
box{<0,1,1><8,2,3>}
pigment{Brown}
rotate y*180
}
background{ color White }
light_source { <10,0,-20> color White}
light_source { <-10,0,-20> color Maroon }
light_source { <0,0,1.5> color White }
// some middle range pipes
object { pipe translate <-5,0,0> scale <1,.5,1>}
object { pipe translate <-4,0,0> scale <1,.6,1>}
object { pipe translate <-3,0,0> scale <1,.7,1>}
object { pipe translate <-2,0,0> scale <1,.8,1>}
object { pipe translate <-1,0,0> scale <1,.9,1>}
object { pipe translate <0,0,0> scale <1,1,1>}
object { pipe translate <1,0,0> scale <1,.95,1>}
object { pipe translate <2,0,0> scale <1,.85,1>}
object { pipe translate <3,0,0> scale <1,.75,1>}
object { pipe translate <4,0,0> scale <1,.65,1>}
object { pipe translate <5,0,0> scale <1,.55,1>}
// the BIG honkin' pipes
object { goldPipe translate <0,0,2> scale <1.7,2.1,1.5> }
object { goldPipe translate <1,0,2> scale <1.7,2.3,1.5> }
object { goldPipe translate <-1,0,2> scale <1.7,2.2,1.5> }
object { goldPipe translate <2,0,2> scale <1.7,2.5,1.5> }
object { goldPipe translate <-2,0,2> scale <1.7,2.4,1.5> }
object { goldPipe translate <3,0,2> scale <1.7,2.7,1.5> }
object { goldPipe translate <-3,0,2> scale <1.7,2.6,1.5> }
object { goldPipe translate <4,0,2> scale <1.7,2.9,1.5> }
object { goldPipe translate <-4,0,2> scale <1.7,2.8,1.5> }
object { goldPipe translate <5,0,2> scale <1.7,3,1.5> }
object { goldPipe translate <-5,0,2> scale <1.7,3,1.5> }
// the wood pipes, usually somewhat large
object { woodPipe translate <0,0,0> }
object { woodPipe translate <1.1,0,0> }
object { woodPipe translate <-1.1,0,0> }
object { woodPipe translate <2.2,0,0> }
object { woodPipe translate <-2.2,0,0> }
object { woodPipe translate <3.3,0,0> }
object { woodPipe translate <-3.3,0,0> }
object { woodPipe translate <4.4,0,0> }
object { woodPipe translate <-4.4,0,0> }
object { woodPipe translate <5.5,0,0> }
object { woodPipe translate <-5.5,0,0> }
object { woodPipe translate <-6.6,0,0> }
// the trumpet pipes (it's supposed to look like a trumpet's bell)
object { hornPipe translate <0,0,0> }
object { hornPipe translate <1,0,0> }
object { hornPipe translate <-1,0,0> }
object { hornPipe translate <2,0,0> }
object { hornPipe translate <-2,0,0> }
object { hornPipe translate <3,0,0> }
object { hornPipe translate <-3,0,0> }
object { hornPipe translate <4,0,0> }
object { hornPipe translate <-4,0,0> }
object { hornPipe translate <5,0,0> }
object { hornPipe translate <-5,0,0> }
object { hornPipe translate <6,0,0> }
object { hornPipe translate <-6,0,0> }
//camera{location<9,15,-18> look_at <0,6,0>} // up and right
camera{location<0,-09,-38> look_at <0,0,0>} //center and back
// the platform that all of the pipes sit on
box {<-10,-10,0> <10,0,7> texture {T_Wood18}}
// the stone blocks on either side
box {<-20,-10,0> <-10,20,7> texture {T_Stone28}}
box {<10,-10,0> <20,20,7> texture {T_Stone28}}
// the stone behind the pipes
box {<-10,0,7> <10,20,7> texture {T_Stone29}}
// the wooden walls and floor
box {<-20,-10,-15> <-20,20,0> texture {T_Wood19}}
box {<20,-10,-15> <20,20,0> texture {T_Wood19}}
box {<-20,-10,0> <20,-10,-38> texture {T_Ruby_Glass}}
// the pews
object { pue translate<-05,-10,-25>}
object { pue translate<13,-10,-25>}
// the ceiling
box {<-20,20,7><20,20,-15> texture{T_Cloud3}}
Figure 23-8 shows that scene as rendered by PovRay.