/* POVRAY PROGRAM TO CREATE THE GLOBULE SHELL [ELLIPSOIDS JOINED BY MERGED TORUS-SECTION CORRIDORS] VERSION OF THE UNIVERSAL TERRESTRIAL DWELLING By ROBERT JOHN MORTON YE572246C COMMAND LINE: povray -visual DirectColor globules.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 = 89.99; //angle of elevation to observer 0 for internal view #declare Height = oh * sind(rd); #declare Dist = oh * cosd(rd); camera{ location<0, Height, Dist> look_at <0, 0, 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 } // TORROIDAL MODULE ----------------------------------------------------------- #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 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>}} #declare A = 4; //horizontal radius of ellipsoid #declare S = sphere{<0, 0, 0>, 1} #declare G = .33333333; //minor radius of torus #declare g = 1 + G; #declare h = sqrt(g*g-1); //major radius of torus #declare r = h/g; //radius of cutting cylinder #declare q = sqrt(1-r*r); #declare L = 1 - q; //half-length of cutting cylinder #declare clipbox = box{<-10,-4,-10>, <10,4,0> translate<0,0,q>} #declare S1 = object{S clipped_by{object{clipbox rotate<0,60,0>}} clipped_by{object{clipbox rotate<0,120,0>}} clipped_by{object{clipbox rotate<0,-60,0>}} clipped_by{object{clipbox rotate<0,-120,0>}} translate<0,0,-2>} #declare S2 = object{S clipped_by{object{clipbox rotate<0,30,0>}} clipped_by{object{clipbox rotate<0,-30,0>}} translate<0,0,-4*cosd(30)> } #declare T = torus{h, G clipped_by{cylinder{<0,L,0>, <0,-L,0>, r}} rotate<0,0,90> translate<0,0,tand(30)> clipped_by{box{<-10,-4,10>, <10,4,0> rotate<0,30,0>}} clipped_by{box{<-10,-4,10>, <10,4,0> rotate<0,-30,0>}} } #declare tri = union{ object{T} object{T rotate<0,-120,0>} object{T rotate<0,+120,0>} translate<0,0,-(2*cosd(30)+tand(30))> } #declare shell = merge{ #declare a = 0; #while(a < 360) object{S1 rotate<0,a,0>} object{S2 rotate<0,a+30,0>} object{tri rotate<0,a + 30,0>} #declare a = a + 60; #end scale<4,2,4> } #declare ninho = difference{ object{shell} cylinder{<0,-3,0>, <0,-1.5,0>, 50} texture{SC2O} } #declare fleg = merge{ cylinder{<0,-4,0>, <0,-1.25,0>, 1 texture{glas}} cylinder{<0,-1.25,0>, <0,-1,0>, 5 clipped_by{object{S scale<4,2,4>}} texture{SC3O}} } #declare flegs = union{ #declare a = 0; #while(a < 360) object{fleg translate<0,0,8> rotate<0,a,0>} object{fleg translate<0,0,16*cosd(30)> rotate<0,a + 30,0>} #declare a = a + 60; #end } /* Doorway height for 8 metre diameter modules is 2.194335083 metres Need a headroom tunnel: an elliptical cylinder with a vertical major axis vertical of 3 metres. */ #declare tunnel = cylinder{<-1.5,0,0>, <1.5,0,0>, 1.5 translate<0,0,A*tand(30)>} #declare tritun = union{ object{tunnel} object{tunnel rotate<0,-120,0>} object{tunnel rotate<0,+120,0>} translate<0,0,-A*(2*cosd(30)+tand(30))> } #declare tunnels = union{ #declare a = 30; #while(a < 360) object{tritun rotate<0,a,0>} #declare a = a + 60; #end texture{SC2O} } //object{tritun} //object{tri scale<4,2,4> texture{SC3O}} union{ //create the complete 12-module ninho of 6 double modules object{ninho} object{tunnels} object{flegs} // clipped_by{cylinder{<0,ground_level-.1,0>, <0,0,0>, 50}} // translate<2*D*cosd(30),0,0> //internal view with Height=0 and Dist=3.6 rotate<0,12.5,0> //to give the whole ninho a nice perspective angle }