/* comment these out to make this a .inc */ #include "colors.inc" #include "glass.inc" #include "metals.inc" #include "stones.inc" #include "skies.inc" #include "wineglass.inc" #include "blade.inc" /* This code contributed to the GPL (glyph's POV-ray Library) by Raffi Krikorian */ // the thing that everythihng is looking at #declare CENTERPIECE = object { union { /* object { union { sphere { <0,0,0> .05 texture { T_Chrome_4D } } box { -0.1, 1.1 texture { T_Glass3 } } } translate -0.5 scale <1.25,0.3,1.75> translate 0.15*y translate 1.05*y } #declare CENTERPIECELEGNUMBER = 1 #while ( CENTERPIECELEGNUMBER != 5 ) object { union { cylinder { 0, 1*y, 0.3 } cone { 0, 0.75, 0.1, 0.3 } cylinder { 0.9*y, 1*y, 0.5 } } pigment { color White } translate -1*z rotate ( 45 + ( CENTERPIECELEGNUMBER * 90 ) )*y texture { T_Grnt10 } } #declare CENTERPIECELEGNUMBER = CENTERPIECELEGNUMBER + 1 #end */ /* that looked bad */ cylinder { 0, y, 1.0 texture{T_Glass1} } cylinder { 1*y, 1.05*y, 2.25 /* texture { T_Glass1 } */ texture {T_Chrome_5C} } object { wineglass scale 0.5 translate <-.5,1.05,0> } object { sword rotate -90*x rotate 33*y translate <.2,1.10,-1.2> } } } // the pillars for the temple sitting at 0 #declare PILLAR_HEIGHT = 7 // height of pillar is the first number #declare PILLAR_DENTS = 15 // the amount of indentations in the pillars #declare PILLAR = object { union { difference { cylinder { -( ( PILLAR_HEIGHT - 2 ) / 2 )*y, ( ( PILLAR_HEIGHT - 2 ) / 2 )*y, 1 } #declare PILLARDENTCOUNT = 1 #while ( PILLARDENTCOUNT != PILLAR_DENTS + 1 ) object { union { cylinder { -( ( ( PILLAR_HEIGHT -2 ) / 2 ) - 1 )*y, ( ( ( PILLAR_HEIGHT - 2 ) / 2 ) - 1 )*y, 1 } sphere { -( ( ( PILLAR_HEIGHT - 2 ) / 2 ) - 1 )*y, 1 } sphere { ( ( ( PILLAR_HEIGHT - 2 ) / 2 ) - 1 )*y, 1 } } /* -1.5 */ translate <0,0,2.0-(0.5/PILLARDENTCOUNT)> rotate ( PILLARDENTCOUNT * ( 360 / PILLAR_DENTS ) )*y } #declare PILLARDENTCOUNT = PILLARDENTCOUNT + 1 #end } cylinder { -( ( ( PILLAR_HEIGHT - 2 ) / 2 ) + 1 )*y, -( ( PILLAR_HEIGHT - 2 ) / 2 )*y, 1.25 } cylinder { ( ( ( PILLAR_HEIGHT - 2 ) / 2 ) + 1 )*y, ( ( PILLAR_HEIGHT - 2 ) / 2 )*y, 1.25 } } scale < 0.8, 1, 0.8 > translate ( PILLAR_HEIGHT / 2 )*y texture { T_Stone15 } } // the dome thing for the top #declare DOME_RADIUS = 10 // the radius of the dome #declare DOME_HEIGHT = 2.5 // the height of the dome from the pillars #declare DOME_DENTS = 12 // the amount of dents in the dome - it MUST be even! #declare DOME = object { union { difference { difference { sphere { 0, DOME_RADIUS } sphere { 0, ( DOME_RADIUS - 2 ) } } #declare DOMEDENTCOUNT = 1 #while ( DOMEDENTCOUNT != ( DOME_DENTS / 2 ) + 1 ) sphere { 0, ( DOME_RADIUS - 0.5 ) scale < ( ( 6.28318530718 / DOME_DENTS ) / 2 ), 1, ( ( DOME_RADIUS - 1 ) / ( DOME_RADIUS ) ) > rotate ( DOMEDENTCOUNT * ( 360 / DOME_DENTS ) )*y } #declare DOMEDENTCOUNT = DOMEDENTCOUNT + 1 #end cylinder { -( DOME_RADIUS + 1 )*y, ( DOME_RADIUS + 1 )*y, 0.5 } box { < -( DOME_RADIUS + 1 ), -( DOME_RADIUS + 1 ), -( DOME_RADIUS + 1 ) >, < DOME_RADIUS + 1, 0, DOME_RADIUS + 1 > } } difference { cylinder { 0*y, ( 0.2 * DOME_HEIGHT )*y, DOME_RADIUS } cylinder { -1*y, ( ( 0.2 * DOME_HEIGHT ) + 1)*y, DOME_RADIUS - 2 } } /* light_source { DOME_HEIGHT*y color White spotlight point_at 0 radius ( atan2( 1.75, ( DOME_HEIGHT + PILLAR_HEIGHT ) ) * 57.29577951308 ) falloff ( atan2( 25, ( DOME_HEIGHT + PILLAR_HEIGHT ) ) * 57.29577951308 ) tightness 15 } */ } scale < 1, ( DOME_HEIGHT / DOME_RADIUS ), 1 > texture { T_Stone8 } } // the assembled temple #declare TEMPLE_RADIUS = 25 // the radius of the base of the dome #declare PILLAR_NUMBER = 14 // the number of pillars holding the dome #declare TEMPLE = object { union { object { DOME translate PILLAR_HEIGHT*y } #declare PILLARPLACECOUNT = 1 #while ( PILLARPLACECOUNT != PILLAR_NUMBER + 1 ) object { PILLAR translate ( DOME_RADIUS - 1 )*z rotate ( PILLARPLACECOUNT * ( 360 / PILLAR_NUMBER ) )*y } #declare PILLARPLACECOUNT = PILLARPLACECOUNT + 1 #end union { cylinder { -1*y, 0, 16 } cylinder { -1*y, -.2*y, 16.3 } cylinder { -1*y, -.4*y, 16.6 } cylinder { -1*y, -.6*y, 16.9 } cylinder { -1*y, -.8*y, 17.2 } texture { T_Stone8 } } cylinder { 0, 0.25*y, 3 texture { T_Stone8 } } object { CENTERPIECE translate 0.25*y } } } /* comment this stuff out to make a .inc */ /* sky_sphere{ S_Cloud4 } object { TEMPLE } light_source { <0,2,-100> color Gray30 } light_source { ( PILLAR_HEIGHT )*y color Gray30 } camera { location <0,2.8,-4> look_at 1.05*y } plane { y, -1 texture { pigment { checker color rgb 1 color blue .2 scale 10 } finish {reflection 0.2 ambient .1} } } */