/* UNIVERSAL TERRESTRIAL DWELLING cd /home/rob/Private/website/projects/landshare/UTD/ command line: povray UTD.pov +W640 +H480 povray UTD.pov +W1280 +H960 NOTE: all shots made at oh=800 */ #include "colors.inc" #include "shapes.inc" #include "textures.inc" #include "glass.inc" global_settings{max_trace_level 256} //max possible is 256 #declare G = 1.61803398875; //golden ratio #declare oh = 800; //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 Distance = oh * cosd(rd); #declare la = 10; //'look-at' location height #declare ang = 3; //angle of camera lens: normally 13, 60 for internal shots /* CAMERA AND CAMERA-LIGHT */ camera{location<0, Height, Distance> look_at <0, la, 0> angle ang} light_source{<0,Height,Distance> color rgb <.5,.5,.5>} 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 // 20x20 lighting element 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 //ENVIRONMENT ----------------------------------------------------------------- #declare gh = -3.75; //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, gh - rp, 0> } // sky_sphere{pigment{color White}} /*standard sky sphere */ 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 } } /* INNER DIVIDING WALLS These divide the inner volume of the UTD into separate rooms. Length of side of square = 12 metres. Length of side of hexagon = 12 * 50 / 360 = 3.33333333333 metres Full wall height = 69 pixels = 2.25 metres Middle = 42 = 1.369565217 metres [1.37] Lowest = 36 = 1.173913043 metres [1.17] middle/full = 42/69 = 0.608695652 lowest/full = 36/69 = 0.52173913 Ancilliary information: Length of side = 3.33333333333 metres = 3333 mm = 167 pixels Distance across flats = side * (1 + 2 * cosd(45)) = 3.33333333333 * 2.414213562 = 8.047378541 metres = 8047 mm = 403 pixels on the sala diagram */ #declare hs = 1.666666667; //half-length of wall #declare hh = 1.125; //half-height of hexagon wall 1.125 metres #declare ht = 0.075; //half-thickness of hexagon wall // sideways shift from middle to edge of hexagon #declare ss = hs * 2 * (1/2 + 1/sqrt(2)); //hexagon wall #declare W = box{<-hs,-hh,-ht>, <+hs,+hh,+ht> translate<0,0,ss>} //Form the half-hexagon #declare H1 = union{ object{W} object{W rotate<0,+45,0>} object{W rotate<0,-45,0>} object{W rotate<0,+90,0>} } //Form the complete hexagon #declare H2 = union{ object{H1} object{H1 rotate<0,180,0>} } //Form the middle line of 3 hexagons #declare ds = ss + ss; #declare H3 = union{ object{H2 translate<-ds,0,0>} //left object{H2} //middle object{H2 translate<+ds,0,0>} //left } #declare st = 0.30; //shell thickness st = 0.30 metres #declare ft = 0.41; //floor thickness st = 0.41 metres [critical] #declare lh = 2.50; //height of underside of UTD above the ground. /* Form the full hive: Floor height above ground level, fh, is leg height, lh, + floor thickness, ft: ie, fh = lh + st. Initial height of bottom of wall, ih, is ground height, gh, - half-height of wall, hh: ih = hh + gh, which is a negative amount. So the wall assembly has to be raised fh + ih = (lh + ft) + (hh + gh) = lh + ft + hh + gh = 2.5 + 0.30 + 1.125 - 3.75 = 0.175 metres */ // Wall lift for balanced protrusion top and bottom = 0.2825 #declare wlift = 0.2825; #declare wd = lh + ft + hh + gh; #declare H = union{ object{H3 translate<0,0,-ds>} //upper object{H3} //middle object{H3 translate<0,0,+ds> } //lower translate<0, wlift, 0> //wall-lift from level zero [1.6] } /* FORM THE LARGEST POSSIBLE BOX CONTAINED WITHIN THE SHELL */ #declare s = 12; //half-length of side of contained square #declare W = box{<-s,-0.5,-s>, translate<0,-0.2,0>} #declare p = 0.8; //angle reducer #declare rl = 12/p; //half-length of the side of contained square in metres /* Radial distance of each leg from centre of the UTD [coordinate origin] is the half-diagonal of the square divided by the Golden Ratio. R = (12/cos 45)/1.61803398875=10.488384587 */ #declare R = rl/G; /* CREATE THE UTD SHELL 1) CREATE A GENERAL BOUNDED HYPERBOLOID */ #declare H0 = intersection { quadric { <1, -1, 1> <0, 0, 0> <0, 0, 0> (12) } object{ box{ <-rl,-rl,-rl>, } } translate<0, rl, 0> } /* 2) GENERATE A SQUARE HYPERBOLOID BY ROTATING A PROGRESSIVELY SCALED VERSION OF THE ABOVE GENERAL BOUNDED HYPERBOLOID The plan view of the square hyperboloid fits into a square of side: s = 2 * rl = 2 * 9.256147934 = 18.512295868 metres. The area of this sqiare is 342.705098304 square metres. */ #declare h = 0.4; //height scale of hyperboloid #declare w = 0.6; //width scale of hyperboloid #declare T = union { #declare a = -45; #while(a <= 45) object { H0 scale < 1/cosd(a*p), h, w > rotate <0, a, 0 > } object { H0 scale < 1/cosd(a*p), h, w > rotate <0, a + 90, 0 > } #declare a = a + 1; #end } /* 3) CREATE A VERTICALLY SCALED BOTTOM HYPERBOLOID AND UNITE IT WITH THE TOP ONE. */ #declare rx = rl + 0.1; //side of clipping box #declare B = intersection{ object{T scale<1, 0.6, 1> rotate<180, 0, 0>} box{<-rx, gh + lh, -rx>, } } #declare S = union{object{T} object{B}} /* CREATE THE INVERTED TETRAHEDRON SUPPORTS*/ /* The edge to vertex length ratio of a regular tetrahedron, which evaluates to 0.816496581 */ #declare b = sqrt(2/3); /* Create a cylinder of length equal to the side of the inverted tetrahedral support and then rotate it around the x-axis 35.264389676 degrees, which is the edge-to-vertex angle of a tetrahedron. */ #declare cr = 0.1; //cylinder radius #declare C = cylinder{<0,0,0>, <0,lh/b,0>, cr rotate<0,0,acosd(b)>} /* Rotate the 3 tubes around the vertical axis to position them 120 degrees apart to form the edges of an inverted tetrahedron. Then translate it vertically downwards to ground level and to the far right corner of the UTD. */ #declare L1 = union{ //1 leg object{C rotate<0,-120,0>} object{C} object{C rotate<0,+120,0>} translate<-R,gh,0> } #declare L = union{ //4 legs object{L1 rotate<0, 45,0>} object{L1 rotate<0, 135,0>} object{L1 rotate<0,-135,0>} object{L1 rotate<0, -45,0>} } // DISPLAY THE COMPLETE UTD #declare UTD = union{ object{S} // shell object{H} // walls object{L} // legs } #declare WALLS = union{object{H clipped_by{object{S}}} object{B}} #declare c1 = texture {pigment{color<0,0,0>} finish{ambient 0.5 phong 0.8}} #declare c = texture { pigment{color rgb<0.36, 0.38, 0.33>} finish{ambient 0.3 phong 0.7} } //walls, shell, legs object{UTD rotate<-90,0,0> translate<0,la,0> texture{c}} //walls clipped by shell //object{WALLS rotate<0,15,0> translate<0,la,0> texture{c}}