/* POV-RAY PROGRAM http://robmorton.20m.com/projects/landshare/eggs/eggs.pov TO GENERATE THE EGG-SHAPED ELLIPSOID VERSION OF THE MODULES AND CONNECTING PASSAGES OF THE ACCOMMODATION UNIT OF THE EXPERIMENTAL FARMLET OF THE LANDSHARE PROJECT by Robert John Morton YE572246C Terminal command for: Small Frame: povray eggs.pov +W320 +H240 Medium Frame: povray eggs.pov +W640 +H480 Large Frame: povray eggs.pov +W1280 +H960 In a Nautilus window do "Ctrl-L Ctrl-Insert" to grab the directory path to this file. Then open a terminal and enter "cd Shift-Insert Enter" to take the terminal to this file's working directory. Finally, cut and paste one of the above commands into the terminal and press "Enter" to start the rendering process. */ #include "colors.inc" #include "shapes.inc" #include "textures.inc" #include "metals.inc" #include "stones.inc" #include "glass.inc" #declare G = 1.61803398875; //golden ratio #declare E = 1.414213562; //square root of 2 #declare B = G; //ratio currently to be used for the ellipsoids #declare ground_level = -5.088078598; //amount ground is below co-ordinate origin (in metres) global_settings{max_trace_level 256} /*max possible is 256 For a normal view, use oh = 100. For an exploded view at less than rd = 45 degrees, use oh = 120. For rd > 45, use oh = 150. Standard views are at rd = 10, 20, 30, 45, 60, 90 However, don't use rd = 90 because the azimuthal orientation goes potty. Use rd = 89.9 Use oh=270 for the big floor plan. */ #declare oh = 900; //hypotenuse distance to observer: 900 normal 1100 plan #declare rd = 35; /*angle of elevation to observer: 0 for internal view x-offset (East-West) 0 = due South | height of observer above ground | | horizontal distance of observer from object | | | object is at the coordinate zero | | | | 13 for external 60 for internal views | | | | | */ camera{location<0, oh*sind(rd), oh*cosd(rd)> look_at<0,0,-15> angle 13} light_source { // THE SUN <0, 0, 1000> // located at south horizon color rgb <1,1,1> // white light cylinder // confined to a cylindrical beam radius 6000 // of radius 600 units diameter at full intensity falloff 20000 // 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 rotate<-80,0,-30> // Sun: ascention 80 degrees, declination 30 degrees } // jitter softens shadows /* Sun: 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. */ #declare rp = 6378140; //Earth radius (metres) sphere{<0,0,0>, rp //create spherical planet the size of the Earth texture{ //define its ground texture that comprises: pigment{color rgb <0.27, 0.34, 0.18>} // 0.56640625/1.15625= // pigment{color rgb <1,1,1>} finish{diffuse 0.2 ambient 0.9} } translate<0, ground_level - rp, 0> } //translate it downwards to ground level sky_sphere{ //standard sky sphere pigment{ gradient y color_map{ [(1 - cos(radians( 30)))/2 color White] [(1 - cos(radians(120)))/2 color rgb<0.4,0.6,1>] } scale 2 translate -1 } } // GLEBA CIRCLE ----------------------------------------------------------------------------------- #declare YELLOW = texture{ pigment{color rgb <0.7515625, 0.7515625, 0.1734375>} //crop corn colour finish{phong 0.8 ambient 0.3} } #declare CROP = texture{ pigment{color rgb <0.3815625, 0.3584375, 0.13875>} //crop ploughed colour finish{phong 0.8 ambient 0.3} } #declare LAKE = texture{ pigment{color rgb <0.23125, 0.346875, 0.578125>} //water blue finish{diffuse 0.3 ambient 0.3 phong .95} } #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 rgb<0.925, 0.925, 0.115625>] //starts at yellow, then blends [1.0 color rgb<0.346875, 0.69375, 0.115625>] //through to field-green } } finish{ //with surface characteristics: diffuse 0.2 //diffusion ambient 0.3 //effective ambient lighting (brightness) } } } #declare gleba = object{gleb scale } // rescale to the size of the 2-hectare gleba /* THREE-CIRCLE GLEBA ----------------------------------------------------------------------------- A gleba is deemed to be 2 hectares in area. That is 20,000 square metres. A three-circle gleba therefore comprises 3 touching circles, each of which has an area of two-thirds of a hectare. */ #declare mgr = sqrt(20000/(3*3.141592653)); //radius of each of the three circles #declare glebshift = mgr * (1/cosd(30)-1); // #declare minigleb = object { gleb scale //squash a 2-hectare circle to a third of its area clipped_by{cylinder{<0, -1, mgr>, <0, 1, 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 translate <0, ground_level, 0> // move the tri-gleb down to ground level } /* 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 & centre of 1-hec 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{ //i = 0 to 360 creates a full hexagon as in ../virtual/virtual.htm #declare i = 120; //i = 120 to 240 creates the 3-arm swastica form #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 ROAD = texture{ pigment{colour rgb <0.21, 0.19, 0.10>} //light grey tarmac. finish{phong 0.8 ambient 0.4} } #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, ground_level-1, 0>, <0, ground_level+1, 0>, fr}} //clipped hexagon 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.2 //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. } /* SPECIAL TEXTURES USED IN THIS PROJECT: The upper declaration for each colour is the conservative colouring used for the finished module. The lower declaration is for a bold exaggerated version of the colour for the purpose of illustrsating clearly the individual panels. */ #declare GLASS = texture{pigment{color Col_Glass_General} finish{F_Glass8}} #declare greene = texture{ //define its ground texture that comprises: // pigment{color rgb<0.629, 0.664, 0.258, 0.5>} pigment{color rgb<0.36, 0.38, 0.33>} finish{ambient 0.2 phong 0.5} } // ELLIPSOIDAL SILO 4 metres diameter and 16 metres high ------------------------------------------ #declare esilo = sphere{ <0, 0, 0>, 2 scale <1, 4, 1> //ellipsoidal silo basic shape translate <0, -2, -lake_radius - 4> //translate it 1.25 times the radius of the island from origin } #declare silo_group = union{ object{esilo rotate <0, +30, 0>} object{esilo} object{esilo rotate <0, -30, 0>} texture{greene} //same material as the ninho lm } // CROP AND LAKE SECTORS -------------------------------------------------------------------------- #declare Sector1 = object{lake // 1-Lake texture{LAKE} translate<0,0,shift> rotate<0,-30,0> } #declare Sector2 = union{ // 2-Crop object{lake texture{YELLOW}} object{silo_group} translate<0,0,shift> rotate<0,-150,0> } #declare Sector3 = union{ // 3-Crop object{lake texture{CROP}} object{silo_group} translate<0,0,shift> rotate<0,-270,0> } #declare ownership = sphere{ //Ellipsoid of gradiented ownership <0, -4, 0>, fr scale<1, 1.5, 1> texture{pigment{color Col_Glass_General}} } /* OBJECTS -------------------- Dimensions in Metres -------------------------- The ninho module is constructed as a sphere of radius R and is then re -scaled to form a circular ellipsoid whose half-height is R times the chosen ratio B. B is the vertical scaling factor, which rescales the whole dwelling unit to make the sphere of radius R into an egg-shaped ellipsoid of horizontal radius R and total half-height R * B. For radius R=4 metres: For B = G; the vertical half-height is 6.472135955 metres. For B = E; the vertical half-height is 5.656854249 metres. Distance of focal point from centre of ellipsoid F = R*sqrt(B*B-1) For B = G; F = 5.088078598, ellipsoid extends 1.384057357m beyond its focus For B = E; F = 4, ellipsoid extends 1.656854249m beyond its focus Total length of the rope-loop needed to describe an elliptical rib of the egg is thus 2*(B*R + F) = 23.120429106 metres for B=G and 19.313708499 metres for B=E. For B=G, and ground level set at -5.088078598 metres, the footprint of each egg is 3.16 metres diameter. Total footprint of ninho is therefore 6 * pi * 1.58 ** 2 = 47.056031403 square metres. wrong: recalculate for focal ground_level. For B=E, and ground level set at -5 metres, the footprint of each egg is 3.16 metres diameter. Total footprint of ninho is therefore 6 * pi * 1.58 ** 2 = 47.056031403 square metres. */ #declare R = 4; //horizontal radius of the ellipsoidal module #declare J = R + 1; //for box to contain sphere of radius R #declare H = 2 * R * sind(45); //Major radius of torus #declare L = R * (1 - sind(45)); #declare V = L + H - R; //semi-length of corridor #declare T = torus{H, R} //create torus #declare N = sphere{<0,0,0>, R hollow} //outer surface #declare a = R*cosd(14); //slicing radius for window cutouts #declare b = 67.5; //odd angle that I do not really understand #declare c = 45; //upward angle of skylight #declare CB1 = box{<-J,-J,-a>, } //clip box for window cutouts #declare CB2 = box{, <-J,-J,-J> rotate<0,b,0>} //clip box for window cutouts #declare NN = object{N //form the basic sphere: clipped_by{object{CB1}} //cut out the hole for the left window clipped_by{object{CB1 rotate<0,120,0>}} //cut hole for right window clipped_by{object{CB2 rotate<0,0,+c>}} //cut hole for the skylight clipped_by{object{CB2 rotate<0,0,-c>}} //cut hole for the groundlight } #declare C = box{, <-J,-J,-J>} #declare O = union{ object{NN clipped_by{object{C}} clipped_by{object{C rotate<0,120,0>}}} object{T clipped_by{cylinder{<0, V, 0>, <0, -V, 0>, R}} rotate<90,0,0> translate<0,0,H>} rotate<0,30,0> translate<-2*H,0,0> } //make a union of 6 node+corridor sections to form complete ninho #declare I = union{ #declare k = 0; #while(k<=360) object{O rotate <0,k,0>} #declare k = k + 60; #end scale<1,B,1> //scale to 1.6 times height to make sphere into egg ellipsoid // clipped_by{cylinder{<0,ground_level,0>, <0,0,0>, 10*R}} //for floor plan rotate<0,30,0> texture{greene} // formerly dm } /* Need to clip object O to cut out the elliptical windows. Window subtends 30 degrees. It is therefore 2*R*sind(15) = 2.070552361 metres wide by sqrt(2)*2.070552361 = 2.92820323 metres high. Start by cutting out a single cap from the sphere. */ #declare WB1 = object{N clipped_by{box{<-J,-J,-a>, }}} #declare WB2 = object{N clipped_by{box{, <-J,-J,J> rotate<0,b,0>}}} #declare W = union{ //CREATE CAP-PAIR FOR THE 2 WINDOWS OF ONE MODULE object{WB1} //rotate 1st window cap to 1st position in module object{WB1 rotate<0,120,0>} //rotate 2nd window cap to 1st position in module object{WB2 rotate<0,0,+c>} //rotate skylight cap to 1st position in module object{WB2 rotate<0,0,-c>} //rotate groundlight cap to 1st position in module rotate<0,30,0> //rotate both to correct position within dwelling translate<-2*H,0,0> //move them radially to the periphery of dwelling } #declare WW = union{ //REPLICATE 6 PAIRS OF WINDOWS IN THEIR CORRECT #declare k = 0; //POSITIONS AROUND THE DWELLING. #while(k<=360) object{W rotate <0,k,0>} #declare k = k + 60; #end scale<1,B,1> //scale to root2 height to make sphere into circular ellipsoid // clipped_by{cylinder{<0,ground_level,0>, <0,0,0>, 10*R}} //for floor plan rotate<0,30,0> texture{GLASS} } //END OF CREATING THE WINDOW CAPS /* Make floor for the connecting neck vertical cylinder clip it to fit the passage inside the torus passage. This cylinder can be conveniently made to be radius R (the radius of the main sphere). */ #declare K = cylinder{<0, -1.5, 0>, <0, -1.8, 0>, R} //large diameter cylinder 300mm high #declare F = merge{ object{K clipped_by{sphere{<0,0,0>, R scale<1,B,1>}}} //clipped by egg-shaped ellipsoid object{K clipped_by{object{T inverse rotate<-90, 0, 0> scale<1, B,1>}} clipped_by{cylinder{<0, 0, V>, <0, 0, -V>, R}} translate<0,0,H> } rotate<0,30,0> translate<-2*H,0,0> } #declare FC = union{ object{F} } #declare FLOOR = union{ //make a union of 6 node+corridor floor sections to form complete floor #declare k = 30; #while(k <= 390) object{FC rotate<0, k, 0>} #declare k = k + 60; #end texture{greene} //desired surface texture // texture{pigment{color rgb <0.4, 0.5, 0.2>} finish{ambient 0.6}} //desired surface texture } /* The floor is 300mm thick. The full external vertical half-height at the mid-point (thinnest part of the neck) of the interconnecting toroidal-section corridor = H - R = 2.68084649 metres. The floor is to be placed 1½ metre below the equitorial plane of the ninho. The total floor to top height of the thinnest part of the corridor is therefore 1.5 + 2.68084649 = 4.18084649. Take 300mm off top and bottom for skin thickness. Corridor internal clearance height is therefore 4.18084649 - 0.3 = 3.88084649 metres. Half-height of lowest part of connecting corridor = B*(H - R) = B*(2*R*sind(45) - R) = B*R*(2*sin45 - 1) = 2.343145751 metres Minimum floor-to-ceiling height of corridor = 1.5 + 2.343145751 - 0.3 = 3.543145751 metres Maximum ground clearance for passing beneath the connecting corridors = R * (2 * sin(45) - 1) * B - ground_level = 3.319153510 metres (yielding floor height 4.5 metres above the ground) for B=G = 2.656854249 metres (yielding floor height 3.5 metres above the ground) for B=E. For B=G with ground_level at the lower focal point: = 4 * 0.414213562 * 1.61803398875 - 5.088078598 = mod(2.680846488 - 5.088078598) = 2.40723211 metres Total height above ground = 5.088078598 + 4 * 1.61803398875 = 11.560214553 metres Window area = 5.083203692 square metres per elliptical window = 10.166407385 for 2 windows. Floor area = 50.265482457 Window area = 10.166407385/50.265482457 = 0.202254249 = 20.2254249% of floor area. Access height through ground_level door = 2.280586544 metres [measured from diagram door.xcf] */ /* Construct and render the final scene. */ union{ object{I} //the 6-node accommodation unit (unsliced) object{WW} object{FLOOR} object{FLOOR rotate<180,0,0>} // clipped_by{box{<-20,ground_level,20>,<+20,7,2*H*cosd(30)-2> rotate<0,-30,0>}} 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 rotate<0,-105,0> //little rotation to kill the boring symmetry translate<6.5,0,7> translate<0,0,-20> rotate<0,-115,0> rotate<0,-100,0> }