/* POVRAY PROGRAM TO CREATE THE HEXAGONOID SHELL VERSION OF THE UNIVERSAL TERRESTRIAL DWELLING By ROBERT JOHN MORTON YE572246C COMMAND LINE: povray -visual DirectColor hex.pov +W640 +H480 set width and height of picture in /etc/povray/3.6/povray.ini */ #include "colors.inc" #include "shapes.inc" #include "textures.inc" global_settings{max_trace_level 256} //max possible is 256 #declare G = 1.6180339887; //golden ratio #declare oh = 200; //hypotenuse distance to observer 3 for internal view #declare rd = 0; //angle of elevation to observer 0 for internal view #declare Height = oh * sind(rd); #declare Dist = oh * cosd(rd); #declare la = 40; camera{ location<0, Height, Dist> look_at <0, la, 0> angle 13 //angle 13 for external and 60 for internal views } light_source{<0,Height,Dist> color rgb <.5,.5,.5>} //camera light #declare fr=79.788456088; //radius of 2-hectare gleba (metres) light_source { //SUN <0, 1000, 0> //located at south horizon color rgb <.7,.7,.5> //reddish-yellow light cylinder //confined to a cylindrical beam radius fr //radius at full intensity falloff 10000 //falling off to 0 brightness at 1000 units radius area_light <1,0,0>, <0,0,1>, 20,20 //lighting element is a 20 x 20 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> //light beam is aimed at the co-ordinate origin rotate <30,0,-15> //rotate sun to desired position in the sky } //ENVIRONMENT ----------------------------------------------------------------- #declare ground_level = -3; //amount ground is below co-ordinate origin #declare md = -7000; //mountains are 5km away #declare rp = 6378140; //Earth radius sphere{<0,0,0>, rp //create spherical planet texture{ //define its ground texture that comprises: pigment{color rgb <0.85, 1.0, 0.6>} finish{diffuse 0.2 ambient 0.5} } //translate it downwards to ground level translate<0, ground_level - rp, 0> } 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 } } // GLEBA CIRCLE --------------------------------------------------------------- #declare gleba_height = .002; //gleba is 5 mm above ground level 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 } } finish { //with surface characteristics: diffuse 0.2 //diffusion ambient 0.5 //effective ambient lighting (brightness) } } translate <0,ground_level,0> //move gradiented circle down to ground level scale //rescale to size of 2-hectare gleba } // MODULE COLOURS ----------------------------------------------------------- #declare SC1O = texture { pigment { color rgb <0.55, 0.51, 0.47>} //, 0.15> } // greeny-red finish { phong 0.8 ambient 0.6 } } #declare SC2O = texture { pigment { color rgb <0.47, 0.55, 0.51>} //, 0.15> } // bluey-green finish { phong 0.8 ambient 0.6 } } #declare SC3O = texture { pigment { color rgb <0.47, 0.51, 0.55>} //, 0.15> } // greeny-blue finish { phong 0.8 ambient 0.6 } } #declare SC4O = texture { pigment { color rgb <0.55, 0.55, 0.47>} //, 0.15> } // yellow finish { phong 0.8 ambient 0.6 } } #declare SC5O = texture { pigment { color rgb <0.47, 0.55, 0.55>} //, 0.15> } // cyan finish { phong 0.8 ambient 0.6 } } #declare SC6O = texture { pigment { color rgb <0.55, 0.47, 0.55>} //, 0.15> } // ? finish { phong 0.8 ambient 0.6 } } #declare tp = 0.5; //transparency #declare SC1T = texture { pigment { color rgb <0.55, 0.51, 0.47, tp>} //, 0.15> } // greeny-red finish { phong 0.8 ambient 0.6 } } #declare SC2T = texture { pigment { color rgb <0.47, 0.55, 0.51, tp>} //, 0.15> } // bluey-green finish { phong 0.8 ambient 0.6 } } #declare SC3T = texture { pigment { color rgb <0.47, 0.51, 0.55, tp>} //, 0.15> } // greeny-blue finish { phong 0.8 ambient 0.6 } } #declare glas = texture{ pigment{color rgb <0.7, 0.7, 0.8, 0.85>} //glass for windows finish{phong 0.9 ambient 0.5} } #declare invisible = texture{pigment{color rgbt<1,1,1,1>}} /* ---------------------------------------------------------------------------- MODULE GEOMETRY - ALL MEASUREMENTS ARE IN METRES */ #declare r = 4; //ratio between across-flats and centre-height #declare H = 3; //half height of module #declare A = r * H; //half distance across flats of hexagon #declare s = H * r / 3; //length of elliptical cylinder // ELLIPSOIDAL DIAGONAL SECTION #declare S = sphere{<0, 0, 0>, 1 scale} // CYLINDER WITH ELLIPTICAL CROSS-SECTION AND ELLIPSOIDAL END-CAPS #declare E = sphere{ //form the hemispherical end caps <0, 0, 0>, 1 //unit sphere clipped in half clipped_by{ box{ < 0, -2, -2 >, < 2, 2, 2 > } } translate< 1, 0, 0 > //move the end-cap a half } //cylinder length outward #declare F = merge{ cylinder{<-1, 0, 0>, <1, 0, 0>, 1} //unit sized cylinder object{E} //add right end-cap object{E rotate<0, 180, 0>} //add left end-cap scale //scale the unit shape } //to elliptify it //MERGE THEM TO FORM THE COMPLETE ACCOMMODATION MODULE #declare M = merge{ merge{ //merge the 3 diagonal ellisoids object{S} object{S rotate<0, 60,0>} object{S rotate<0,120,0>} texture{SC4O} } object{F texture{SC1O}} //add the 3 capped ellipsoidal cylinders object{F rotate<0,60,0> texture{SC2O}} object{F rotate<0,120,0> texture{SC3O}} } #declare N = object{M translate<2*A,0,0>} #declare P = merge{ #declare a = 0; #while(a < 360) object{N rotate<0,a,0>} #declare a = a + 60; #end } object{M translate<0,la,0> rotate<0,0,0>}