/* POVRAY PROGRAM TO CREATE THE TORUS SHELL WITH AN ADVANCED HEXAGONAL FORM OF INTERNAL DIVISION [CODE NAMED: LDC6] OF THE UNIVERSAL TERRESTRIAL DWELLING By: ROBERT JOHN MORTON YE572246C COMMAND LINE: povray -visual DirectColor ldc6.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 0, 0, 0 13 0,-103,0 6,0,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, -1.5 13 0,-103,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 Floor Plan 0,402,5 0,0,0 13 1280x960 Floor Plan 0,201,5 0,0,0 13 1280x960 View20-320 Picture sizes: small = 320 by 240, med = 640 by 480, big = 1280 by 960 Large-scale floor plan = 3.637681159 x small-scale floor plan x=0, y=110.509960159, z=5 To make the movie, fly the camera around a circle 70 metres radius that passes through the centre of the ninho. The camera rises sinusoidally as it recedes from the centre of the ninho. Note: my eye height is -2.27 metres from the zero level 4 metres above the ground. */ camera { location <0,-2.27,402> look_at <0, 0, 0> angle 13 } // LIGHTING --------------------------------------------------------------------------------------- // light_source { <15, 200, 30> color rgb <1, 1, 1> } // 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 // 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.40, 0.50, 0.52, 0.49> } // grey with a suggestion of light green finish { phong 0.8 ambient 0.6 } } #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.9 } } #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 GLASS = texture{pigment{color Col_Glass_General}} #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 = 0; #while (k < 360) object { minigleb rotate <0, k+60, 0> } #declare k = k + 120; #end } #declare ownership = sphere{<0,-4,0>, fr scale<1,1.5,1> texture{GLASS}} //ownership sphere // ROOMS -------------------------------------------------------------------- #declare G = 1.6180339887; //golden ratio #declare A = 60; //one sixth of a turn #declare sr = 2.5; #declare mr = 3.809020974456847; #declare lr = 4.959276897788913; #declare R1 = 19.629825745222725; // beta = 0.7829815406250482 radians #declare beta = 44.861537714; /* #declare sr = 2; //radius of small circle #declare mr = 2.5; //radius of medium circle #declare lr = 4; //radius of large circle #declare R1 = 16.807746306240446; //radius of the outer containing circle */ #declare R = lr+lr; //radius from centre of ninho to centre of large room #declare R2 = lr; //radius of the inner containing circle 7.590461216 #declare Rm = (R1 - R2) / 2; //minor radius of the unpadded torus 4.608642545 #declare RM = Rm + R2; //major radius of the unpadded torus 12.199103761 #declare sf = cylinder{<0,-1,0>,<0,4,0>,sr translate<0,0,sr+lr>} //small floor #declare mf = cylinder{<0,-1,0>,<0,4,0>,mr translate<0,0,mr+lr>} //medium floor #declare lf = cylinder{<0,-1,0>,<0,4,0>,lr} //large floor #declare theta = asind(sr/(sr+lr)); #declare fg = union{ object{lf} object{sf rotate<0, theta,0>} object{sf rotate<0,-theta,0>} object{mf rotate<0,-beta-theta,0> } translate<0,0,R> } #declare floors = union{ #declare a = 0; #while(a < 360) object{fg rotate<0,a,0>} #declare a = a + A; #end } #declare h1 = 2.5; //height clearance under the ninho #declare hc = 1.00; //horizontal radial clearance of outer skin #declare th = 0.75; //maximum thickness of shell material #declare S = h1 * G / (Rm + hc); //vertical scaling factor #declare Touter = torus{RM, Rm + hc scale<1,S,1>} #declare Tinner = torus{RM, Rm + hc - th scale<1,S,1>} #declare TT = difference{ object{Touter clipped_by{cylinder{<0,-1.51,0><0,10,0>, 30}}} cylinder{<0,-1.51,0><0,-1.505,0>, 25} } // 2) GARDEN AND LAKE ----------------------------------------------------------------------------- #declare road_height = 0.008; // thickness of road material = 8 millimetres #declare ir = 11.5; // radius of the rounded corners of the 1-hectare hexagons #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 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 sectors = union{ union { // 1-Lake object { lake texture { LAKE } } object { island } translate <0,0,shift> rotate <0,120,0> } union { // 2-Crop object { lake texture { CYAN } } object { island } // object { silo_group } translate <0,0,shift> rotate <0,0,0> } union { // 3-Crop object { lake texture { YELLOW } } object { island } // object { silo_group } translate <0,0,shift> rotate <0,-120,0> } } // ROADS ------------------------------------------------------------------------------------------ #declare road = box{<-1,-4,2>,<+1,-3.99,fr>} //one road #declare roads = union{ //3 roads arranged radially #declare a = 0; #while(a < 360) object{road rotate<0,a,0>} #declare a = a + A + A; #end texture{ROAD} } #declare ninho = union{ object{floors clipped_by{object{Tinner}} texture{Inner_Colour}} // object{floors texture{Inner_Colour}} // cylinder{<0,-1.2,0>,<0,-1.1,0>, R1 texture{Shell_Colour}} object{TT texture{Shell_Colour}} // clipped_by{box{<-100,-3.9,-100>,<100,5,0>}} //to create elevation view rotate<0,30,0> } // CREATE THE COMPLETE LANDSHARE ------------------------------------------------------------------ #declare landshare = union { // object{ownership} // transparent ellipsoid showing extent of "ownership" space // object{crater} // object{gleba} // circular area with radial colour gradient object{trigleb} object{roads} object{sectors} // object{plinths} object{ninho} } object{landshare // clipped_by{box{<-100,-4,-100>,<100,-.8,100>}} //to create floor-plan view rotate<0,7,0> // translate<0,0,-14.024554285> //to create a good angled view // translate }