/* POVRAY PROGRAM FOR THE TRI-FLOWER VERSION OF THE UNIVERSAL TERRESTRIAL DWELLING By: ROBERT JOHN MORTON YE572246C COMMAND LINE: povray -visual DirectColor tri-flower.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" #include "metals.inc" #include "stones.inc" #include "glass.inc" // CAMERA ---------------------------------------------------------------- global_settings { max_trace_level 256 } // max possible is 256 #declare r = 1; #declare h = 500; #declare l = h * r; camera { // establish a camera to view the scene location <0, h, l> look_at <2, -1, -6> // camera is looking at a point a little to the right and in front of the origin angle 1 // the aperture angle. This affects the zooming of the scene. } // LIGHTING -------------------------------------------------------------- // 1) Simulate the sun light_source { // cylinder light <450, 1000, 800> // located quite high, well forward and a little to the left color White // white light cylinder // confined to a cylindrical beam radius 70 // of radius 30 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 arral 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 light_source { // cylinder light <450, 1000, 800> // located quite high, well forward and a little to the left color rgb <.8,.7,.6> // white light cylinder // confined to a cylindrical beam radius 70 // of radius 30 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 arral 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 // 2) simulate light from the horizon light_source { < 0, 50, 500> color rgb <.6, .8, 1> } // ordinary point source of horizon light light_source { < 433, 50, -250> color rgb <.6, .8, 1> } // ordinary point source of horizon light light_source { <-433, 50, -250> color rgb <.6, .8, 1> } // ordinary point source of horizon light // BACKGROUND ------------------------------------------------------------ #declare LandArea = texture { pigment { agate turbulence 1 lambda 1.5 omega .8 octaves 8 color_map { [0.00 color rgb <.5, .25, .15>] [0.33 color rgb <.1, .5, .4>] [0.86 color rgb <.6, .3, .1>] [1.00 color rgb <.5, .25, .15>] } } } plane { y, -4 // create a ground plane 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.3 // effective ambient lighting (brightness) } } } 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 } } // OBJECTS -------------------- Dimensions in Metres ------------------------- #declare stairs = cylinder { <0, -4, 0>, <0, 1.5, 0>, 1.5 hollow texture { T_Glass4 } interior { I_Glass4 } // giving it the desired surface texture finish { phong 1 } // and no shine } /* THE BASIC ELLIPSOIDAL OBJECT This is a general ellipsoid: that is, the radii of all three axes are different. The size of the ellipsoid is determined by the largest radius, which is 5 metres. This radius is in line with the radial line of the daisy. The lesser horizontal radius is 2.886751345948128822545743902505 metres. This is the radius of the circle that encloses the hexagon surrounding a circle of radius 2.5 metres. It enables our 5 metre diameter circular floor area to be accommodated in each petal unit. The smallest (the vertical) radius is 3 metres because this gives an appropriate head clearance for people throughout the petal unit. */ #declare A = union { // CREATE BASIC ELLIPSOID OBJECT sphere { <0, 0, 0>, 3.5 hollow // form a sphere of radius 5 metres scale <1, 0.5, 12/7> // squash its lateral and vertical axes } cylinder { // form the ellitical floor <0, -1.0254, 0>, <0, -1, 0>, 2.5 scale <1, 1, 12/7> } rotate <0, 60, 0> // rotate it 60 degs clockwise clipped_by { box { <-12, -2, -11>, <12, 2, 2.5> } } // clip to mesh with adjacent petal on left rotate <0, -120, 0> // rotate it to 60 degs anticlockwise clipped_by { box { <-12, -2, -11>, <12, 2, 2.5> } } // clip to mesh with adjacent petal on right rotate <0, 60, 0> // rotate it back in line with z-axis translate <0, 0, -5> // move it to its peripheral position } #declare a = merge { // PETAL UNIT object { A } cylinder { // chop to make the end concave <0, -2, 0>, <0, 2, 0>, 1.5 pigment { color rgbt<1,1,1,1> } // make it completely transparent } cylinder { <0, 1.5, 0>, <0, 1.8, 0>, 1 // chop out the hole for the skylight pigment { color rgbt<1,1,1,1> } // make it completely transparent translate <0, 0, -5> } } #declare b = merge { // PATIO UNIT object { A clipped_by { box { <-4, -2, 0 >, <4, 2, -10> } } } cylinder { // make it completely transparent <0, -2, 0>, <0, 2, 0>, 1 pigment { color rgbt<1,1,1,1> } // make it completely transparent } cylinder { <0, 1, 0>, <0, 2, 0>, 2 // chop out the patio roof pigment { color rgbt<1,1,1,1> } // make it completely transparent translate <0, 0, -5> } } #declare S = object { // SKYLIGHT A // clip the section of surface off the ellipsoid clipped_by { cylinder { <0, 1.5, -5>, <0, 1.8, -5>, 1 } } texture { T_Glass4 } // give it a glass texturegiving it the desired s interior { I_Glass4 } // and glass interior finish { phong 1 } // and maximum shine } #declare c = box { <-0.1, -4, -1>, <0.1, -1, 1> texture { T_Glass4 } translate <0, 0, -5> } // ground support // DECLARE A PETAL OBJECT IN EACH OF THE THREE COLOUR SCHEMES #declare p = 0.7; // major colour level #declare q = 0.5; // minor colour level #declare s = 0.3; // lower intermediate colour #declare w = 0.6; // higher intermediate colour #declare h = 0.4; // 'absent' component #declare RED = texture { pigment { agate agate_turb 0.5 color_map { [0.00 color ] // red [s color ] // cyan [w color ] // yellow [1.00 color ] // red } } finish { phong 0.8 } } #declare GREEN = texture { pigment { agate agate_turb 0.5 color_map { [0.00 color ] // green [s color ] [w color ] [1.00 color ] // green } } finish { phong 0.8 } } #declare BLUE = texture { pigment { agate agate_turb 0.5 color_map { [0.00 color ] // blue [s color ] [w color ] [1.00 color ] // blue } } finish { phong 0.8 } } #declare floor1 = cylinder { <0, 0, 0>, // top centre point <0, 0.0254, 0>, // base centre point 2.5 // radius of the floor texture { Jade } // giving it the desired surface texture finish {phong 1} translate <0, -1, 0> // shift it vertically to the floor level of the ellipsoid } #declare r_petal = union { // THE 'RED' PETAL object { a texture { RED } } object { S } object { c } } #declare g_petal = union { // THE 'GREEN' PETAL object { a texture { GREEN } } object { S } object { c } } #declare b_petal = union { // THE 'BLUE' PETAL object { a texture { BLUE } } object { S } object { c } } #declare r_patio = union { // THE 'RED' PATIO object { b texture { RED } } object { c } } #declare g_patio = union { // THE 'GREEN' PATIO object { b texture { GREEN } } object { c } } #declare b_patio = union { // THE 'BLUE' PATIO object { b texture { BLUE } } object { c } } // GENERATE THE THREE DAISIES #declare c = union { object { r_patio } object { g_petal rotate <0, 60, 0> } object { r_petal rotate <0, 120, 0> } object { g_petal rotate <0, 180, 0> } object { r_petal rotate <0, 240, 0> } object { g_patio rotate <0, 300, 0> } object { stairs } rotate <0, 30, 0> } #declare d = union { object { g_patio } object { b_petal rotate <0, 60, 0> } object { g_petal rotate <0, 120, 0> } object { b_petal rotate <0, 180, 0> } object { g_petal rotate <0, 240, 0> } object { b_patio rotate <0, 300, 0> } object { stairs } rotate <0, 30, 0> } #declare e = union { object { b_patio } object { r_petal rotate <0, 60, 0> } object { b_petal rotate <0, 120, 0> } object { r_petal rotate <0, 180, 0> } object { b_petal rotate <0, 240, 0> } object { r_patio rotate <0, 300, 0> } object { stairs } rotate <0, 30, 0> } // ASSEMBLE THE THREE DAISIES INTO THE COMPLETE DWELLING // #declare s = 11.547005383792515290182975610039; // dist from centre of triangle to centre of flower for 20 metre separation between flower centres #declare s = 10.969655114602889525673826829537; // dist from centre of triangle to centre of flower for 19 metre separation between flower centres #declare m = merge { object { c translate <0, 0, s> } object { d translate <0, 0, s> rotate <0, 120, 0> } object { e translate <0, 0, s> rotate <0, 240, 0> } rotate <0, 12.5, 0> } union { object { b_petal } // ellipsoidal petal unit object { floor1 translate <0,0,-5> } // circular floor rotate <0, -17.5, 0> } // object { m } // object { d rotate <0, 132.5, 0> } // SOLELY TO DEMONSTRATE THE GENERAL ELLIPSOIDAL SHAPE #declare AA = merge { // CREATE BASIC ELLIPSOID OBJECT union { sphere { <0, 0, 0>, 3.5 hollow // form a sphere of radius 5 metres scale <1, 0.5,1> // z=12/7 squash its lateral and vertical axes } cylinder { // form the ellitical floor <0,-1,0>, <0,0.0254-1,0>, 2.5 scale <1, 1, 1> }} cylinder { <0, 1, 0>, <0, 2, 0>, 1 // chop out the hole for the skylight pigment { color rgbt<1,1,1,1> } // make it completely transparent } translate <0, 0, -5> } #declare BB = union { // THE FULL 'RED' PETAL object { AA texture { RED } } object { S } } #declare CC = union { object { BB } object { BB rotate <0, 60, 0> } object { BB rotate <0, 120, 0> } object { BB rotate <0, 180, 0> } object { BB rotate <0, 240, 0> } object { BB rotate <0, 300, 0> } rotate <0, 30, 0> } // object { BB rotate <0, 12.5, 0> } /* // SPECIAL TEXTURES USED IN THIS PROJECT #declare p = 0.7; // major colour level #declare q = 0.5; // minor colour level #declare s = 0.3; // lower intermediate colour #declare w = 0.6; // higher intermediate colour #declare h = 0.4; // 'absent' component #declare RED = texture { pigment { agate agate_turb 0.5 color_map { [0.00 color ] // red [s color ] // cyan [w color ] // yellow [1.00 color ] // red } } finish { phong 0.8 } } #declare GREEN = texture { pigment { agate agate_turb 0.5 color_map { [0.00 color ] // green [s color ] [w color ] [1.00 color ] // green } } finish { phong 0.8 } } #declare BLUE = texture { pigment { agate agate_turb 0.5 color_map { [0.00 color ] // blue [s color ] [w color ] [1.00 color ] // blue } } finish { phong 0.8 } } // OBJECTS -------------------- Dimensions in Metres ------------------------- #declare stairs = cylinder { <0, -4, 0>, <0, 1.5, 0>, 1.5 hollow texture { T_Glass4 } interior { I_Glass4 } // giving it the desired surface texture finish { phong 1 } // and no shine } /* THE BASIC ELLIPSOIDAL OBJECT This is a general ellipsoid: that is, the radii of all three axes are different. The size of the ellipsoid is determined by the largest radius, which is 5 metres. This radius is in line with the radial line of the daisy. The lesser horizontal radius is 2.886751345948128822545743902505 metres. This is the radius of the circle that encloses the hexagon surrounding a circle of radius 2.5 metres. It enables our 5 metre diameter circular floor area to be accommodated in each petal unit. The smallest (the vertical) radius is 3 metres because this gives an appropriate head clearance for people throughout the petal unit. */ #declare A = sphere { // CREATE BASIC ELLIPSOID OBJECT <0, 0, 0>, 3.5 hollow // form a sphere of radius 5 metres scale <1, 0.5, 12/7> // squash its lateral and vertical axes rotate <0, 60, 0> // rotate it 60 degs clockwise clipped_by { box { <-12, -2, -11>, <12, 2, 2.5> } } // clip to mesh with adjacent petal on left rotate <0, -120, 0> // rotate it to 60 degs anticlockwise clipped_by { box { <-12, -2, -11>, <12, 2, 2.5> } } // clip to mesh with adjacent petal on right rotate <0, 60, 0> // rotate it back in line with z-axis translate <0, 0, -5> // move it to its peripheral position } #declare B = merge { // CREATE ELLIPTICAL FLOOR cylinder { <0, -1.0254, 0>, <0, -1, 0>, 2.5 scale <1, 1, 12/7> rotate <0, 60, 0> // rotate it 60 degs clockwise clipped_by { box { <-12, -2, -11>, <12, 2, 2.5> } } // clip to mesh with adjacent petal on left rotate <0, -120, 0> // rotate it to 60 degs anticlockwise clipped_by { box { <-12, -2, -11>, <12, 2, 2.5> } } // clip to mesh with adjacent petal on right rotate <0, 60, 0> // rotate it back in line with z-axis translate <0, 0, -5> // move it to its peripheral position } cylinder { // chop to make the end concave <0, -2, 0>, <0, 2, 0>, 1.5 pigment { color rgbt<1,1,1,1> } // make it completely transparent } } #declare a = merge { // PETAL UNIT object { A } cylinder { // chop to make the end concave <0, -2, 0>, <0, 2, 0>, 1.5 pigment { color rgbt<1,1,1,1> } // make it completely transparent } cylinder { <0, 1.5, 0>, <0, 1.8, 0>, 1 // chop out the hole for the skylight pigment { color rgbt<1,1,1,1> } // make it completely transparent translate <0, 0, -5> } } #declare b = merge { // PATIO UNIT object { A clipped_by { box { <-4, -2, 0 >, <4, 2, -10> } } } cylinder { // make it completely transparent <0, -2, 0>, <0, 2, 0>, 1 pigment { color rgbt<1,1,1,1> } // make it completely transparent } cylinder { <0, 1, 0>, <0, 2, 0>, 2 // chop out the patio roof pigment { color rgbt<1,1,1,1> } // make it completely transparent translate <0, 0, -5> } } #declare S = object { // SKYLIGHT A // clip the section of surface off the ellipsoid clipped_by { cylinder { <0, 1.5, -5>, <0, 1.8, -5>, 1 } } texture { T_Glass4 } // give it a glass texturegiving it the desired s interior { I_Glass4 } // and glass interior finish { phong 1 } // and maximum shine } #declare c = box { <-0.1, -4, -1>, <0.1, -1, 1> texture { T_Glass4 } translate <0, 0, -5> } // ground support // DECLARE A PETAL OBJECT IN EACH OF THE THREE COLOUR SCHEMES #declare floor1 = cylinder { <0, 0, 0>, // top centre point <0, 0.0254, 0>, // base centre point 2.5 // radius of the floor texture { Jade } // giving it the desired surface texture finish {phong 1} translate <0, -1, -5> // shift it vertically to the floor level of the ellipsoid } #declare petal = union { // THE 'RED' PETAL object { a texture { BLUE } } object { S } object { B texture { GREEN } } object { floor1 texture { Jade } } } object { petal rotate <0, -17.5, 0> } */