/* POVRAY PROGRAM TO CREATE THE SAUSAGES SHELL VERSION OF THE UNIVERSAL TERRESTRIAL DWELLING By: ROBERT JOHN MORTON YE572246C COMMAND LINE: povray -visual DirectColor sausages.pov +W640 +H480 */ #include "colors.inc" #include "shapes.inc" #include "textures.inc" #include "metals.inc" #include "stones.inc" #include "glass.inc" global_settings { max_trace_level 256 } // max possible is 256 /* CAMERA ----------------------------------------------------------------------------------------- VIEW LOCATION LOOK-AT ANGLE ROTATE TRANSLATE FILENAME Horizontal 0, 4, 350 -6, 0, 0 13 0,-103,0 hor_med Near Angled 0,130,260 0, 0, 0 13 0,-103,0 6,0,10 near_ang_med Far Angled 0,350,700 0,0, 0 13 0,-103,0 6,0,10 far_ang_med Close Plan 0,225,20 0,0,0 13 0,-103,0 0, 0, -1.5 Medium Plan 0,480,30 0, 0, 0 13 0,-103,0 0,0,3 plan_med Gleba Plan 0,1100,20 -6, 0, -4 13 0,-103,0 0,0,0 trigleb Lower Stairs 0,-2.75,-15 0, -2.75, 0 20 0,-150,0 0, 0,-RS downstairs Landing 0,1.38,-3.5 0, -1.5, 0 60 0,-150,0 0, 0,-RS landing Passage 7.25, .7, 9.5 7.25, -1, -9.5 25 0,0,0 0,0,0 passage Picture sizes: small = 320 by 240, med = 640 by 480, big = 1280 by 960 */ camera { location <0,0,100> look_at <0,0,0> angle 13 } // LIGHTING --------------------------------------------------------------------------------------- light_source { <0, 0, 0> color rgb <.5, .4, .3> } //for quick tests // light_source { <7.25, 1.1, 8> color rgb <1, 1, 1> } //for quick tests // 1) Simulate the sun #declare sun_white = light_source { // WHITE SUN IS ON THE HORIZON DUE SOUTH <0, 0, 1000> // located at south horizon color rgb <.4,.5,.3> // white light cylinder // confined to a cylindrical beam radius 100 // of radius 100 units diameter at full intensity falloff 200 // falling off to zero brightness at 70 units diameter area_light <1,0,0>, <0,0,1>, 20,20 // lighting element is a 20 x 20 array of pixels adaptive 1 // the normal of which is determined by the vectors jitter // adaptive = minimise number of test rays required point_at <0, 0, 0> // the light beam is aimed at the co-ordinate origin } // jitter softens shadows #declare sun_yellow = light_source { //YELLOW SUN IS ON THE HORIZON DUE SOUTH <0, 0, 1000> // located at south horizon color rgb <.8,.7,.6> // yellow light cylinder // confined to a cylindrical beam radius 100 // of radius 100 units diameter at full intensity falloff 200 // falling off to zero brightness at 70 units diameter area_light <1,0,0>, <0,0,1>, 20,20 // lighting element is a 20 x 20 array of pixels adaptive 1 // the normal of which is determined by the vectors jitter // adaptive = minimise number of test rays required point_at <0, 0, 0> // the light beam is aimed at the co-ordinate origin } // jitter softens shadows /* rotate the sun to its desired elevation eg -60 means the sun is 60 degrees above the horizon due south. Rotate it round the z-axis to simulate time of day eg -15 means 15 degrees (one hour) before noon. Sun: ascention 80 degrees, declination 30 degrees */ union { object { sun_white } object { sun_yellow } rotate <-80,0,-30> } // 2) simulate light from the horizon #declare luz = light_source { <0, -1.6, 500> color rgb <.15, .25, .3> } // horizon light #declare horizonglow = union { #declare iii = 0; #while(iii < 360) object { luz rotate <0,iii,0> } #declare iii=iii + 51.428571429; #end } object { horizonglow rotate <0,0,0> } // rotate the 7 horizon lights to best position // 3) RING OF LIGHTS AROUND THE TOP OF THE LIFT-SHAFT TO LIGHT THE STAIRS FROM ABOVE #declare upper_light = light_source { <1.5, 1.6, 0> color rgb <.25, .25, .2> } #declare upper_stair_lights = union { object { upper_light } object { upper_light rotate <0, 72,0> } object { upper_light rotate <0,144,0> } object { upper_light rotate <0,216,0> } object { upper_light rotate <0,288,0> } } // 4) RING OF LIGHTS AROUND THE BOTTOM OF THE LIFT-SHAFT TO LIGHT THE STAIRS FROM BENEATH #declare lower_light = light_source { <0, -3.95, 1.5> color rgb <.15, .15, .1> } #declare lower_stair_lights = union { object { lower_light } object { lower_light rotate <0, 72,0> } object { lower_light rotate <0,144,0> } object { lower_light rotate <0,216,0> } object { lower_light rotate <0,288,0> } } // BACKGROUND ------------------------------------------------------------------------------------- plane { y, -4 // CREATE A GROUND PLANE texture { // define its texture that comprises: pigment { color rgb <0.85, 1.0, 0.6> } finish { diffuse 0.2 ambient 0.5 } } } sky_sphere { pigment { gradient y color_map { [ (1 - cos( radians( 30) )) / 2 color White ] [ (1 - cos( radians(120) )) / 2 color Blue ] } scale 2 translate -1 } } /* SPECIAL TEXTURES USED IN THIS PROJECT ---------------------------------------------------------- Shell Deep Magenta 0.53, 0.40, 0.80 Shell Light Magenta 0.53, 0.47, 0.80 (magentaish grey) Shell Light Green 0.53, 0.80, 0.47 (yellowish grey) Shell Light Pink 0.80, 0.53, 0.47 Shell Light Brown 0.80, 0.47, 0.53 */ #declare Shell_Colour = texture { pigment { color rgb <0.50, 0.52, 0.49> } // grey with a suggestion of light green finish { phong 0.8 ambient 0.5 } } #declare Inner_Colour = texture { pigment { color rgb <0.57, 0.55, 0.53> } // grey with a hint of red finish { phong 0.8 ambient 0.5 } } #declare YELLOW = texture { pigment { color rgb <0.82, 0.78, 0.29> } // crop corn colour finish { phong 0.8 ambient 0.4 } } #declare CYAN = texture { pigment { color rgb <0.58, 0.55, 0.30> } // crop ploughed colour finish { phong 0.8 ambient 0.4 } } #declare ROAD = texture { pigment { colour rgb <0.52, 0.49, 0.50> } // light grey tarmac. finish { phong 0.8 ambient 0.4 } } #declare LAKE = texture { pigment { color rgb <0.46, 0.54, 0.97> } // water blue finish { diffuse 0.3 ambient 0.3 phong .95 } } #declare GLASS1 = texture { pigment { color Col_Glass_General } finish { F_Glass8 } } #declare GLASS2 = texture { pigment { color Col_Glass_Green } finish { F_Glass8 } } // OBJECTS -------------------- Dimensions in Metres ---------------------------------------------- #declare ground_level = -4; // depth of the ground below the co-ordinate origin // GLEBA CIRCLE --------------------------------------------------------------------------------- #declare gleba_height = .002; // gleba is 5 mm above ground level #declare fr = 79.788456088; // radius of a 2-hectare gleba (in metres) #declare gleb = cylinder { <0, 0, 0>, <0, gleba_height, 0>, 1 // thin cylinder of unit radius texture { // define its texture that comprises: pigment { onion color_map { [0.0 color Yellow] // starts at yellow, then blend through to [1.0 color rgb <0.815, 1.015, 0.51>] // field-green rgb <0.8, 1.0, 0.5> } } finish { // with surface characteristics: diffuse 0.2 // diffusion ambient 0.5 // effective ambient lighting (brightness) } } translate <0, ground_level, 0> // move the gradiented circle down to ground level } #declare gleba = object { gleb scale } // rescale to the size of the 2-hectare gleba // ------------------------------------------------------------------------------------------------ #declare mgr = sqrt(20000/(3*3.141592653)); // mini-gleba radius #declare glebshift = mgr * (1/cosd(30)-1); #declare minigleb = object { gleb scale clipped_by { cylinder { <0, -5, mgr>, <0, -3, mgr>, mgr } } translate <0, 0, glebshift> } #declare trigleb = union { #declare k = 30; #while (k < 390) object { minigleb rotate <0, k, 0> } #declare k = k + 120; #end } /* 1-THE HEXAGONAL ROAD SYSTEM -------------------------------------------------------------------- Each of the 3 hexagons has an area, A = 1 hectare = 10,000 square metres. The perpenducular between the mid-point of each side of a hexagon and that hexagon's centre, hp = sqrt(A/(6*tand(30))) metres. Each side of each hexagon, hs = 2*sqrt(A/(6*tand(60))) metres. The points of each hexagon are rounded to a radius ir = 11.5 metres. Consequently, the length of the straight part of each side of a hexagon, hst = hs - 2*(ir-1)*Tan(30) = 31.744778112 metres. */ #declare A = 10000; // area of hexagon in square metres #declare hp = sqrt(A/(6*tand(30))); // perp between mid-point of side and centre of 1-hectare hexagon #declare hs = 2*sqrt(A/(6*tand(60)));// total length of the side of a 1-hectare hexagon in metres #declare ir = 11.5; // radius of the rounded corners of the 1-hectare hexagons #declare ird = ir + ir; // diameter #declare hst = hs-2*(ir-1)*tand(30); // length of straight part of road forming side of hexagon #declare road_height = 0.008; // thickness of road material = 8 millimetres #declare circ_road = difference { // create a circular road 2 metres wide cylinder { <0, 0, 0>, <0, road_height, 0>, ir } // and 5 mm high cylinder { <0, -.01, 0>, <0, 2*road_height, 0>, ir - 2 pigment { color rgbt<1,1,1,1> } // make this inner circle invisible } } #declare hex_side = union { object { circ_road clipped_by { box { <-ird, -1, 0>, <+ird, +1, ird> } } rotate <0,30,0> // clip out a 30 degree arc for rounded corner clipped_by { box { <0, -1,-ird>, <-ird, +1, ird> } } translate <0, 0, 1-ir> // move it from origin to island tangent. } box { <0, 0, -1>, }// path 2 metres wide, x metres long, 8 mm high translate <-hst/2, ground_level, hp> // Move side to ground level and to a position } /* such that the hexagon of which it would be a part is centred at the co-ordinate origin. */ #declare hex = union { #declare i = 120; #while(i < 240) object {hex_side rotate <0,i,0> } // form a complete hexagon #declare i = i + 60; #end translate // set co-ordinate origin at } // one corner of the hexagon #declare roads = union { // create the 3-hexagon landshare object { hex } // bounded by peripheral roads object { hex rotate <0,120,0> } object { hex rotate <0,240,0> } clipped_by { cylinder { <0, -5, 0>,<0, -3, 0>, fr } } texture { ROAD } } // 2) GARDEN AND LAKE ----------------------------------------------------------------------------- #declare island_height = .006; // height of island #declare shift = 1-ir*(1+1/cosd(30)); // shift from lake-centred to landshare-centred #declare lake_radius = 19.5; // radius of lake #declare island = union { object {circ_road texture { ROAD } } cylinder { // island in the centre of the circular road <0, 0, 0>, <0, island_height, 0>, ir - 2 texture { // define its texture that comprises: pigment { color rgb <0.8, 1.0, 0.5> // colour field-green rgb <0.8, 1.0, 0.5> } finish { // with surface characteristics: diffuse 0.2 // diffusion ambient 0.31 // effective ambient lighting (brightness) } } } translate <0, ground_level, ir> } #declare lake_height = .004; // lake height 4mm above ground #declare lake = cylinder { // THE LAKE (centred on centre of lake) <0, ground_level, 0>, <0, ground_level + lake_height, 0>, lake_radius // Lake 19.5 metres radius. } // ------------------------------------------------------------------------------------------------ #declare RS = 8.5; // THE ELLIPSOIDAL CONNECTING BRIDGE --------------------------------------------- #declare fe = 7.36; #declare ff = fe+1; #declare fg = fe+1.5; #declare bridge_outer=difference{ cylinder{<0,0,-fe>, <0,0,+fe>, 1.1 scale<1,2,1>} box {<-2,-3,-fg>, <2,-1.2,+fg>} } #declare bridge_inner=difference{ cylinder{<0,0,-fe>, <0,0,+fe>, 1.0 scale<1,2,1>} box {<-2,-3,-fg>,<2,-1,+fg>} texture{Inner_Colour} } #declare DCleft = cylinder { <-0.5,0,0>, <-3,0,0>, 0.4 } #declare DCright = cylinder { <+0.5,0,0>, <+3,0,0>, 0.4 } #declare DT = union { object { DCright translate <0,0,+5> } object { DCright translate <0,0,+3> } object { DCright translate <0,0,+1> } object { DCright translate <0,0,-1> } object { DCright translate <0,0,-3> } object { DCright translate <0,0,-5> } object { DCleft translate <0,0,+2> } object { DCleft } object { DCleft translate <0,0,-2> } scale<1,2,1> } #declare outer_biggie = sphere { <0,0,0>, 4.2 scale<1,2,1> } #declare bridge = difference { union { merge { object{bridge_inner} //form the inner shell with window hole liners object{DT texture{Shell_Colour}} clipped_by{object{bridge_outer}} } difference{ //cut the window holes in the outer shell object{bridge_outer texture{Shell_Colour}} object{DT pigment { color rgbt<1,1,1,1> }} } cylinder { //form the windows as a single object <0,0,-ff>, <0,0,+ff>, 1.09 scale<1,2,1> clipped_by{ object{DT} } texture{GLASS1} } translate<3,0,0> //move bridge laterally to tangent of biggies } union { //ends clipped-off by invisible biggies object{outer_biggie translate<0,0,+fe>} object{outer_biggie translate<0,0,-fe>} pigment { color rgbt<1,1,1,1> } } rotate<0,-40,0> } object{bridge} // BIG WEDGE CUTTER ------------------------------------------------------------------------------- #declare rang = 51.428571429; // one seventh of a rotation #declare Wedge1 = cylinder { <0,0,5>, <0,0,2>, 1 scale <1,2,1> translate <0,-3.5,0> } #declare Wedge2 = union { #declare i = 0; #while (i < 360) object { Wedge1 rotate <0,i,0> } #declare i = i + rang; #end } #declare Wedge3 = union { object { Wedge2 } object { Wedge2 translate <0,8,0> } } #declare biggie1 = union { sphere { <0,0,0>, 4.2 } // outer skin sphere { <0,0,0>, 4.0 } // inner skin scale <1,2,1> // stretch sphere to ellipsoid } #declare biggie2 = difference { object { biggie1 } object { Wedge3 } texture { Shell_Colour } } /* #declare bridge=difference{ difference{ object{bridge} object{biggie1 pigment { color rgbt<1,1,1,1> }} translate<0,0,fe+fe> } object{biggie1 pigment { color rgbt<1,1,1,1> }} }*/ #declare biggie2 = union { merge { object { biggie2 } sphere { <0,0,0>, 4.19 scale <1,2,1> texture { GLASS1 } } } light_source { <0, 0, 0> color rgb <.7, .6, .5> } cylinder { <0,-1.5,0>, <0,-1,0>, 4 } // cylindrical floor } #declare biggie = difference{ object{biggie2} difference{ cylinder { <0,0,0>, <0,0,+ff>, 1.0 scale<1,2,1> } //punch box {<-2,-3,-fg>, <2,-1.5,+fg>} pigment{color rgbt<1,1,1,1>} } } // object{biggie} // NINHO ELLIPSOIDS ------------------------------------------------------------------------------- #declare E = union { union { sphere { <0,0,0>, 2.7 } // outer skin sphere { <0,0,0>, 2.5 } // inner skin scale <1,2,1> // stretch sphere to ellipsoid } cylinder { <0,-1.5,0>, <0,-1,0>, 2.5 } // cylindrical floor } #declare wedge1 = cylinder { <0,0,3>, <0,0,1>, .5 scale <1,3,1> translate <0,-3,0> } #declare wedge2 = union { #declare i = 0; #while (i < 360) object { wedge1 rotate <0,i,0> } #declare i = i + rang; #end } #declare wedge3 = union { object { wedge2 } object { wedge2 translate <0,6,0> } } #declare EE = difference { object { E } object { wedge3 } texture { Shell_Colour } } #declare EF = union { merge { object { EE } sphere { <0,0,0>, 2.69 scale <1,2,1> texture { GLASS1 } } } light_source { <0, 0, 0> color rgb <.7, .6, .5> } translate <0, 0, 6.55> // Move small unit to its correct radial } #declare E2 = union { object { biggie } object {EF rotate<0,+67.5,0>} object {EF rotate<0,+22.5,0>} object {EF rotate<0,-22.5,0>} object {EF rotate<0,-67.5,0>} } #declare F = merge { object {E2} translate <0,0,RS> } // CREATE THE SILOS ------------------------------------------------------------------------------- // ELLIPSOIDAL SILO #declare esilo = object { E translate <0, 0, -ir*1.3> // translate it 1.5 times the radius of the island from origin } #declare silo_group = union { object { esilo rotate <0,+22.5,0>} object { esilo } object { esilo rotate <0,-22.5,0>} texture { Shell_Colour } // same material as the ninho translate <0,0,ir> // shift the group origin to the centre of the lake } // CROP AND LAKE SECTORS -------------------------------------------------------------------------- #declare Sector1 = union { // 1-Lake object { lake texture { LAKE } } object { island } translate <0,0,shift> rotate <0,-30,0> } #declare Sector2 = union { // 2-Crop object { lake texture { CYAN } } object { island } object { silo_group } translate <0,0,shift> rotate <0,-150,0> } #declare Sector3 = union { // 3-Crop object { lake texture { YELLOW } } object { island } object { silo_group } translate <0,0,shift> rotate <0,-270,0> } #declare ninho = union { // NINHO object { F } // rest/play pod object { F rotate <0,120,0> } // work/access pod object { F rotate <0,240,0> } // rest/play pod rotate <0,30,0> // clipped_by { box { <-50,-4,-50>, <50,0,50> } } // optional: open view of floors inside **** } #declare ownership = sphere { // Ellipsoid of gradiented ownership <0, -4, 0>, fr scale <1, 1.5, 1> texture { pigment { color Col_Glass_General } } } // CREATE THE COMPLETE LANDSHARE ------------------------------------------------------------------ #declare landshare = union { // object { ownership } // transparent ellipsoid showing extent of "ownership" space // object { gleba } // circular area with radial colour gradient object { trigleb } // clover-leaf form of the gleba object { roads } // the three-way raos system of the gleba object { Sector1 } // the lake (and island) object { Sector2 } // first crop crescent object { Sector3 } // second crop crescent object { ninho } // the buildings } // DISPLAY FINAL OBJECT --------------------------------------------------------------------------- // object{landshare rotate <0,-103,0> translate <6, 0, 10>} // END OF PROGRAM ---------------------------------------------------------------------------------