/* POVRAY PROGRAM TO CREATE THE CLOVER-LEAF SHELL VERSION OF THE UNIVERSAL TERRESTRIAL DWELLING By: ROBERT JOHN MORTON YE572246C COMMAND LINE: povray -visual DirectColor clover.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 -6, 0, 0 13 0,-103,0 hor_med Near Angled 0,130,260 -6, 0, 10 13 0,-103,0 near_ang_med Far Angled 0,350,700 -6,0,-10 13 0,-103,0 far_ang_med Close Plan 0,225,20 0, 0, -1.5 13 0,-103,0 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 Lower Stairs 0,-2.75,-15 0, -2.75, 0 20 0,-150,0 0, 0,-RS downstairs Landing 0,1.38,-3.5 0, -1.5, 0 60 0,-150,0 0, 0,-RS landing Passage 7.25, .7, 9.5 7.25, -1, -9.5 25 0,0,0 0,0,0 passage Picture sizes: small = 320 by 240, med = 640 by 480, big = 1280 by 960 */ camera { location <0,1300,20> look_at <-6, 0, -4> 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 <1,1,1> // white light cylinder // confined to a cylindrical beam radius 150 // 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 <1,1,1> // yellow light cylinder // confined to a cylindrical beam radius 150 // 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 } rotate <-80,0,-30> } //object { sun_yellow } // 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 // 3) RING OF LIGHTS AROUND THE TOP OF THE LIFT-SHAFT TO LIGHT THE STAIRS FROM ABOVE #declare upper_light = light_source { <1.5, 1.6, 0> color rgb <.25, .25, .2> } #declare upper_stair_lights = union { object { upper_light } object { upper_light rotate <0, 72,0> } object { upper_light rotate <0,144,0> } object { upper_light rotate <0,216,0> } object { upper_light rotate <0,288,0> } } // 4) RING OF LIGHTS AROUND THE BOTTOM OF THE LIFT-SHAFT TO LIGHT THE STAIRS FROM BENEATH #declare lower_light = light_source { <0, -3.95, 1.5> color rgb <.15, .15, .1> } #declare lower_stair_lights = union { object { lower_light } object { lower_light rotate <0, 72,0> } object { lower_light rotate <0,144,0> } object { lower_light rotate <0,216,0> } object { lower_light rotate <0,288,0> } } // BACKGROUND ------------------------------------------------------------------------------------- #declare ground_level = -4; //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 } } /* 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.50, 0.52, 0.49> } // grey with a suggestion of light green finish { phong 0.8 ambient 0.5 } } #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.5 } } #declare YELLOW = texture { pigment { color rgb <0.90, 0.86, 0.32> } // 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.38671875, 0.625, 0.73828125> } // water blue finish { diffuse 0.3 ambient 0.3 phong .95 } } #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 ---------------------------------------------- // 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 rgb <1, 1, 0, 0.5>] // starts at yellow, then blend through to [1.0 color rgb <0.815, 1.015, 0.51, 0.5>] // 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 = 30; #while (k < 390) object { minigleb rotate <0, k, 0> } #declare k = k + 120; #end } /* 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 and centre of 1-hectare 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 #declare i = 0; //i = 120 to 240 creates the 3-arm swastica form #while(i < 360) 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 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, -5, 0>,<0, -3, 0>, fr } } 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.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. } // 3) THE PETAL SHELL ------------- See geometry.bmp in this folder ------------------------------- #declare A = sphere { // BASIC ELLIPSOID FROM WHICH TO MAKE THE PETAL ENVELOPE <0, 0, 0>, 2 hollow // form a sphere of radius 2 metres scale <3, 1, 4> // squash its lateral and vertical axes [originally scale <1, 0.45, 1.6> ] translate <0, 0, 2.5> // translate to its empirically-determined radial offset position } #declare RS = 8.5; // outward radial shift of petal from centre of its large circle #declare w = 67.5; // degrees of arc #declare ww = w * 2 / 3; #declare S = 6.5; // distance from centre of big circle to centre of each little circle #declare th = 22.5; // semi-angle of the inner circles in degrees #declare TH = 67.5; // semi-angle of the outer circles in degrees #declare P0 = merge { // Form petal shape by revolving THE BASIC ELLIPSOID OBJECT #declare j = -w; #while( j <= w) // CENTInner_Colour ON THE PIVOT POINT object { A rotate <0, j, 0> } #declare j = j + ww; #end } #declare P = union { // FORM THE FLAT-BOTTOMED PETAL SHELL object { P0 clipped_by { box { <-30, -1.5, -30>, <30, 3, 30> } } } // slice off the bottom box { <-30, -1.5, -30>, <30, -1.499, 30> clipped_by { object { P0 } } } // add the flat bottom panel } /* Use the command below in place of the one above in order to display a cylinder-only version of the ninho, ie, one where the cylindrical rooms are NOT encapsulated in the ellipsoidal shell envelope. */ // #declare P = cylinder { <0,-1.5,0>, <0,+2,0>, 10 } // 4) THE CYLINDERS THAT WILL MAKE UP THE INNER ROOMS OF THE NINHO -------------------------------- #declare qd = 0.5; // half-width of a door (in metres) /* The following box is the standard doorway between adjacent cylinders. It is 1 metre wide and 2 metres high. Its depth is sufficient to ensure that the sides of the doorway join the two adjacent cut-away cylinders. The small cylinder is 2.5 metres radius, so the doorway box starts 2.448 metres from the centre of the cylinder. The centre of the doorway thus stands proud of the rim of the cylindrical room by 52 mm at its centre. This ensures that the doorway box is flush with the rim at the sides. The doorway is sufficiently deep to project 52 mm into the adjacent cylindrical room. However, because there is a gap of 5 cm between rooms, this extra 5 cm has to be added to the two lots of 52 mm to get the full depth of the doorway unit. The doorway unit thus projects 102 mm beyond the rim cylindrical room to which it is attached (merged). */ #declare dor = box { <-qd, -1, -2.448>, <+qd, +1, -2.602> } #declare lit_cyl = merge { merge { cylinder { <0, -1, 0>, <0, +2, 0>, 2.5 } // small cylindrical room 5 metres diameter object { dor } // add the first doorway unit rotate <0, -67.5, 0> // rotate into position for the second doorway } object { dor } // add the second doorway unit translate <0, 0, 6.55> // Move small cylindrical room to its cirrect radial } // position relative to the large cylindrical room. #declare cyls = merge { // FORM CLUSTER OF CYLINDRICAL ROOMS FOR PETAL UNIT merge { merge { merge { merge { // FORM THE BIG CYLINDRICAL ROOM merge { cylinder { <0, -1, 0>, <0, +2, 0>, 4.0 } // big cylindrical room 8 metres diameter box { <2,-1,0>, <4,+1,-8> } // bridge corridor rotate <0,-60,0> // rotate to position for the other bridge corridor } box { <-2,-1,0>, <-4,+1,-8> } // add the second bridge corridor rotate <0,+30,0> // rotate back to the neutral position } object { lit_cyl rotate <0, -67.5, 0> } // add the outer left small cylindrical room } object { lit_cyl rotate <0, -22.5, 0> } // add the inner left small cylindrical room } object { lit_cyl rotate <0, +22.5, 0> } // add the inner right small cylindrical room } object { lit_cyl rotate <0, +67.5, 0> } // add the outer right small cylindrical room } #declare bhc = union { // HOLE CUTTER FOR BRIDGE ENTRANCES box { <+2,-1,-5>, <+4,+1,-8> rotate <0,-30,0> } // cut the left bridge hole box { <-2,-1,-5>, <-4,+1,-8> rotate <0,+30,0> } // cut the right bridge holes } #declare F = union { // FORM A COMPLETE PETAL UNIT WITH THE CYLINDRICAL ROOMS INSIDE object { P texture { Shell_Colour } } // the petal envelope P object { cyls clipped_by { object { P } } texture { Inner_Colour } } // clip cylinder cluster to fit inside P } // 5) HOLE CUTTERS FOR SKY LIGHTS ----------------------------------------------------------------- #declare SH = cylinder { <0,1.5,0>, <0,2.5,0> 1.0 translate <0,0,S> } // skylight hole #declare CH = cylinder { <0,1.5,0>, <0,2.5,0> 1.5 translate <0,0,S> } // central hole #declare PH = cylinder { <0,0.5,0>, <0,2.5,0> 2.0 translate <0,0,S> } // patio hole #declare SB = box { <-.2, 1.4, 3.5>, <+.2, 2.6, 0> } // single spoke for atrium sky light #declare CU = union { // COMBINED SPOKE CUTTER object { SB } object { SB rotate <0, 45, 0> } object { SB rotate <0, 90, 0> } object { SB rotate <0, 135, 0> } object { SB rotate <0, 180, 0> } object { SB rotate <0, 225, 0> } object { SB rotate <0, 270, 0> } object { SB rotate <0, 315, 0> } cylinder { <0,1.4,0>, <0,2.6,0>, 1 } // with central cap cutter } #declare OSC = union { // OUTER SKY LIGHT CUTTER object { SH rotate <0,-TH,0> } // outer left skylight hole object { SH rotate <0,+TH,0> } // outer right skylight hole } #declare OSL = union { // OUTER SKY LIGHTS object { P clipped_by { object { SH rotate <0,-TH,0>} } } // outer left skylight object { P clipped_by { object { SH rotate <0,+TH,0>} } } // outer right skylight } // 6) THE "TRIANGULAR" GLASS SUPPORTS ------------------------------------------------------------- #declare lcy = cylinder { <0,-4.1,0>, <0,3.1,0> 2.495 translate <0,0,S> } // small cylinder #declare qR = 4 / cosd(22.5); // radial distance from centre of large circle to centre // of "triangle" between adjacent circular floors #declare qr = 4 * tand(22.5) - qd; // see supports_geometry.bmp #declare qS = 6.5 * cosd(22.5) - qd; // qd is half the width of a doorway (0.5metres) #declare S0 = difference { // CREATE ONE GLASS SUPPORT difference { cylinder { <0,-4,qR>, <0,3,qR>, qr } // cylinder from which to cut support column union { // FORM THE GROUP OF CIRCULAR CUTTING CYLINDERS cylinder { <0,-4.1,0>, <0,3.1,0> 3.995 } // large circular object { lcy rotate <0,+th,0> } // left small circular object { lcy rotate <0,-th,0> } // right small circular } } box { <-qd,-4.1,qS>, <+qd,3.1,qS+1> } // clip the odd-one-out point of the triagle } #declare SL0 = union { //triangular glass ground support with internal lights light_source { <0, +1.6, 3.95> color rgb <.2, .2, .1> } // light at top of glass support // light_source { <0, -3.6, 3.95> color rgb <.2, .2, .1> } // light at bottom of glass support } #declare SL = union { // THE GROUP OF 3 LIGHTS FOR THE 3 TRIANGULAR SUPPORTS object { SL0 rotate <0,-45,0> } // left support object { SL0 } // centre sipport object { SL0 rotate <0,+45,0> } // right support } #declare S3 = union { // FORM THE 3 "TRIANGULAR" GLASS SUPPORTS AS ONE OBJECT object { S0 rotate <0,-45,0> } // left support object { S0 } // centre support object { S0 rotate <0,+45,0> } // right support } // THIS OBJECT IS ALSO USED AS A HOLE CUTTER #declare TS = union { // CLIPPED TRIANGULAR GLASS SUPPORTS object { S3 clipped_by { object { P } } } //part of supports within shell object { S3 clipped_by { box { <-20,-4,-20>, <20, -1.5, 20> } } } //part betwetranslate <0,0,RS>en ground and shell } // 7) THE 6 SEMI BRIDGES THAT LINK THE 3 PETAL UNITS ---------------------------------------------- #declare semi_bridge = union { union { box { <+2.000,+0.992,-5>, <+4.000,+0.996,-7.36> } // top box { <+2.004,-1.000,-5>, <+2.008,+1.000,-7.36> } // left side box { <+3.992,-1.000,-5>, <+3.996,+1.000,-7.36> } // right side texture { GLASS1 } // make them of glass } box { <+2.004,-0.996,-5>, <+3.996,-0.992,-7.36> texture { Inner_Colour } } // semi-bridge floor } #declare semi_bridges = union { object { semi_bridge rotate <0,-30,0> } // right semi-bridge object { semi_bridge translate <-6,0,0> rotate <0,+30,0> } // left semi-bridge } // THE GENERIC FORM USED FOR THE "REST" AND "PLAY" UNITS ------------------------------------------ #declare P1 = union { // THE COMPLETE 'REST' AND 'PLAY' MODULES union { difference { object { F } // integrated shell and cylinders object union { // HOLE CUTTER FOR "REST" AND "PLAY" PODS object { S3 } // cutter for the 3 triangular glass support holes object { CH translate <0,0,-S>} // central skylight hole object { OSC } // outer left and right right skylight holes object { PH rotate <0,-th,0> } // inner left patio hole object { PH rotate <0,+th,0> } // inner right patio hole object { bhc } // cutter for the entrance holes for glass bridge pigment { color rgbt<1,1,1,1> } // make this whole union invisible } } union { object { P clipped_by { object { CH translate <0,0,-S> } } } // central skylight object { P clipped_by { object { S3 } } } object { OSL } // outer sky lights object { TS } // clipped triangular glass supports object { SL } // lights inside the 3 supports cylinder { <0, -4, 0>, <0, -1.05, 0>, 1 } // central round glass support texture { GLASS1 } // make them of glass } } object { semi_bridges } translate <0,0,RS> } // THE LIFT-SHAFT, LANDING AND STAIRCASE ---------------------------------------------------------- #declare landing = difference { // landing (as a 90 degree sector of a bolt washer) difference { difference { // first form an anulus with closed curved edges cylinder { <0, -1.075, 0>, <0, -1.00, 0> 2 } cylinder { <0, -1.076, 0>, <0, -0.99, 0> 1 } } box { <-2.50, -1.08, 0>, <+2.50, -.95, -2.50> } //chop in half leaving closed surfaces rotate <0, 90, 0> } box { <-2.50, -1.08, 0>, <+2.50, -.95, -2.50> } //chop in half again leaving closed surfaces } /* The helical bannister is made up of hundreds of little short cylinders. Each cylinder is tilted (rotated around its perpendicular horizontal axis) to create the downward slope of the bannister. How do we calculate how much to tilt the little cylinders? Each stair is 15 degrees of rotation about the central glass shaft. The bannister is just short of the outer rim of the staircase. It is centred at radius of 1.95 metres from the centre of the central shaft. The linear measure of the outer rim of a stair is therefore 1.95 * 15 / pi metres. This is the same as the distance between the centre of one step and the centre of the step above or below it. The bannister travels this distance horizontally for each stair descent of 0.157894737 metres. The bannister's angle of descent is therefore atand( (0.157894737 * pi) / (1.95 * 15) ) = 17.186260882 degrees */ #declare banunit = cylinder { // stairs bannister section <-0.03, 0.1, 1.95>, <+0.03, 0.1, 1.95>, .03 // 6cm long. 6cm diameter rotate <0, 0, 17.186260882> // slope angle of helical bannister } // Small cylinder used to construct the landing-bannister anulus #declare lanunit = cylinder { <-0.03, 0.1, 2.05>, <+0.03, 0.1, 2.05>, .03 } #declare bs = cylinder { <0, -1.05, 0>, <0, +0.3, 0>, .01 // cylinder of radius 1 cm scale <3.5, 1, 2> // morph it to a 4cm by 7 cm elliptical cylinder } #declare bsc = object { bs clipped_by { box { <-1, -1.05, -1>, <+1, +0.1, +1> } } } #declare sbs = object { // support for straight part of the landing bannister bsc rotate <0, 90, 0> translate <0, 0, 1> // translate it to the inner edge of the landing } #declare cbs = cylinder { // support for circular part of the landing bannister bsc translate <0, 0, 2.05> // translate it over the edge of the landing floor } #declare tcbs = union { // Round landing bannister segment object { cbs rotate <0, -2.5, 0> } // complete with 3 vertical supports object { cbs rotate <0, -7.5, 0> } object { cbs rotate <0, -12.5, 0> } torus { 2.05, .03 clipped_by { box { <0, -.04, 0>, <-2.5, +.04, 2.5> } } rotate <0,75,0> clipped_by { box { <0, -.04, 0>, <-2.5, +.04, 2.5> } } translate <0, .1, 0> } } #declare stair = union { // Form a 15 degree stair complete with bannister segment. difference { // use the landing shape to form a stair object { landing rotate <0, -15, 0> } // a stair is 15 degrees of the anulus box { <0, -1.08, -2.5>, <+2.5, -.95, +2.5> } } #declare k = 0.107894737; // length (in metres) of shortest bannister support #declare j = -12.5; // angle of support with respect to centre of lift shaft #while ( j < 0 ) object { bs // clip standard support object to appropriate length clipped_by { box { <-1, -1.05, -1>, <+1, k, +1> } } translate <0, 0, 1.95> // translate support to outer edge of stair rotate <0, j, 0> // rotate it to the correct position along periphery } #declare k = k + 0.052631579; // drop (metres) between adjacent stair bannister supports #declare j = j + 5; // angle between adjacent bannister supports #end merge { // stair-bannister #declare k = 0; // angle of rotation #declare j = 0.157894737; // downward shift #while(k >-15) object { banunit rotate < 0, k, 0 > translate < 0, j, 0 > } #declare j = j - 0.0157894737; // bannister-drop in metres #declare k = k - 1.5; // bannister rotation in degrees #end } // light_source { < 0, -1.0325, 1.1 > color rgb < .04, .04, .03 > } // light inside stair } #declare shaft = cylinder { <0,-4,0>, <0, 3, 0>, 1 } // glass lift-shaft cylinder #declare staircase = union { union { object { shaft clipped_by { object { P } } } // section from base to roof of envelope object { shaft clipped_by { box { <-20,-4,-20>, <20, -1.5, 20> } } } // from ground to base of envelope texture { GLASS1 } // GLASS1 } union { object { landing } // 90 degree segment glass landing union { // form a helical staircase #declare k = 0; // angle of rotation #declare j = 0; // downward shift #while(k>-270) #declare j = j - 0.157894737; // stair-drop in metres object { stair rotate < 0, k, 0 > translate < 0, j, 0 > } object { tcbs rotate < 0, k, 0 > } // 15 degree landing-bannister section #declare k = k - 15; // stair rotation in degrees #end } cylinder { <2.05, 0.1, 0>, <1, 0.1, 0>, .03 } // straight part of landing-bannister union { #declare j = 0.075; // with 6 supports #while (j < 1) object { sbs translate <0, 0, j> } // support for straight part of bannister #declare j = j + 0.15; #end rotate <0, 90, 0> // rotate it to run radially } texture { GLASS2 } // GLASS2 } rotate <0, 135, 0> // rotate staircase to desired orientation } // FORM THE COMPLETE WORK/ACCESS POD -------------------------------------------------------------- #declare ar = 3; // radius of atrium sky light #declare P3 = union { // THE COMPLETE 'WORK/ACCESS' MODULE difference { difference { object { F } // complete envelope with interior cylindrical rooms cylinder{<0,-1.5,0>, <0,-1,0>, 2.001 texture{Shell_Colour}} //liner for staircase hole } union { // hole cutter No 2 - for the work/access pod difference { // Segment Cutter for Atrium skylight cylinder { <0,1.4,0>, <0,2.6,0> ar } // cylinder the diameter of the atrium sky light object { CU } // cut out the 5 sky light segments } object { S3 } // cutter for the 3 triangular glass support holes cylinder { <0,-1.501,0>, <0, -.999,0>, 2 } // central floor hole for lift and staircase object { OSC } // outer left and right right skylight holes object { SH rotate <0,-th,0> } // outer left skylight hole object { SH rotate <0,+th,0> } // outer right skylight hole object { bhc } // cutter for entrance holes for the glass bridge pigment { color rgbt<1,1,1,1> } // make this whole union invisible } } union { difference { // Atrium skylight object { P clipped_by { cylinder { <0,1.4,0>, <0,2.6,0>, ar } } } object { CU } } object { OSL } // outer sky lights object { P clipped_by { object { SH rotate <0,-th,0> } } } // inner left skylight object { P clipped_by { object { SH rotate <0,+th,0>} } } // inner right skylight object { TS } // clipped triangular glass supports object { P clipped_by { object { S3 } } } // triangular glass tops to support columns texture { GLASS1 } } object { semi_bridges } object { staircase } object { upper_stair_lights } object { lower_stair_lights } object { SL } // lights inside the 3 supports translate <0,0,RS> // move to radial position from site centre } // CREATE THE SILOS ------------------------------------------------------------------------------- #declare flute = box { <-.25,-7,1.7>, <+.25,7,3> } #declare flutes = union { object { flute } object { flute rotate <0, 72,0> } // flute cut-out object { flute rotate <0,144,0> } // flute cut-out object { flute rotate <0,216,0> } // flute cut-out object { flute rotate <0,288,0> } // flute cut-out } /* CYLINDRICAL SILO #declare silo = difference { cylinder { <0,0,0>, <0,8,0>, 2 } // silo cylinder object { flutes } // flute cut-out texture { Shell_Colour } // same material as the ninho translate <0,-4,-ir*1.3> // translate it 1.5 times the radius of the island from origin } */ // ELLIPSOIDAL SILO #declare esilo = sphere { <0,0,0>, 2 scale <1,4,1> // ellipsoidal silo basic shape // object { flutes } // flute cut-out texture { Shell_Colour } // same material as the ninho translate <0, -2, -ir*1.3> // translate it 1.5 times the radius of the island from origin } #declare silo_group = union { object { esilo rotate <0,+22.5,0>} object { esilo } object { esilo rotate <0,-22.5,0>} translate <0,0,ir> // shift the group origin to the centre of the lake } // CROP AND LAKE SECTORS -------------------------------------------------------------------------- #declare Sector1 = union { // 1-Lake object { lake texture{ LAKE } } object { island } translate <0,0,shift> rotate <0,-30,0> } #declare Sector2 = union { // 2-Crop object { lake texture { YELLOW } } object { island } object { silo_group } translate <0,0,shift> rotate <0,-150,0> } #declare Sector3 = union { // 3-Crop object { lake texture { CYAN } } object { island } object { silo_group } translate <0,0,shift> rotate <0,-270,0> } #declare ninho = union { // NINHO object { P1 } // rest/play pod object { P3 rotate <0,120,0> } // work/access pod object { P1 rotate <0,240,0> } // rest/play pod rotate <0,30,0> // clipped_by{box{<-50,-4,-50>, <50,0,50>}} // optional: open view of floors inside **** } #declare ownership = sphere { // Ellipsoid of gradiented ownership <0, -4, 0>, fr scale <1, 1.5, 1> texture { pigment { color Col_Glass_General } } } // ELLIPSOIDAL MODULE --------------------------------------------------------- #declare A = 8; //horizontal radius of main ellipsoid #declare S = sphere{<0,0,0>, 1} //unit sphere #declare G = 1; //minor radius of torus #declare g = G + 1; //see geometry.png #declare h = sqrt(g*g - 1); //major radius of torus (root3 = 1.732050808) #declare r = h/g; //radius of cutting cylinder #declare q = sqrt(1 - r*r); //clipping radius for sphere apertures #declare L = 1 - q; //half-length of cutting cylinder #declare T = torus{h, G} //torus from which to make the connecting necks between modules /* Corridor external vertical = (A/2)*(h - G) = 4 * 0.732050808 = 2.928203232 metres Take 33cm off top and bottom for skin thickness. Corridor internal clearance = 2.268203232 metres = 1.134101616 metres above and below the zero line. Allows 134mm for floor thickness, which must also accommodate all conduits. Floor is 1 metre below zero centre-plane. Height of inter-module opening = 1.134101616 + 1 = 2.134101616 metres This is the actual door clearance of the doors in my flat. */ #declare clipbox = box{<-10,-4,-10>, <10,4,0> translate<0,0,q>} #declare M = union{ //COMPLETE MODULE COMPRISING ONE SPHERE AND ONE NECK union{ //MAKE THE SPHERICAL MODULE WITH IONNER FLOOR object{S} //unit sphere cylinder{ //cylinder from which to make floor for sphere <0,-2/A,0>, //which will end up 1 metre below the centre-zero level <0, -2/A-0.134, 0>, 4 clipped_by{object{S}} //clip it to fit its place in the unit sphere } clipped_by{object{clipbox rotate<0,+60,0>}} //clip the sphere so it has clipped_by{object{clipbox rotate<0,-60,0>}} //2 flats as of a hexagon } union{ //MAKE TORUS-SECTION NECK TO JOIN THE SPHERICAL MODULES object{T} //torus for connecting neck between the ellipsoidal modules cylinder{ //MAKE FLOOR FOR THE CONNECTING NECK <0,0,2/A>, <0, 0, 2/A+0.134>, 4 //vertical cylinder clipped_by{object{T inverse}} //clip it to fit the passage inside the torus passage } clipped_by{ //clip so only the central core of the torus remains cylinder{<0,+L,0>, <0,-L,0>, r} } rotate<90,0,0> //rotate torus from vertical to horizontal along radial translate<0,0,1> //move its centre to the periphery of the sphere rotate<0,60,0> //revolve it 60 around the centre of the sphere } translate<0,0,-2> //move it to the periphery of the complete ninho } merge{ //replicate the sphere with one connecting corridor #declare a = 0; //to form 6 joined spheres #while(a < 360) object{M rotate<0,a,0>} #declare a = a + 60; //advance 60 degrees to draw next module #end scale //rescale from unit sphere to sized ellipsoid // clipped_by{cylinder{<0,ground_level-.1,0>, <0,0,0>, 50}} rotate<0,12,0> //to give the whole ninho a nice perspective angle texture{SCO} //texture of the complete ninho } // CREATE THE COMPLETE LANDSHARE ------------------------------------------------------------------ #declare landshare = union { // object { ownership } // transparent ellipsoid showing extent of "ownership" space // object { gleba } // circular area with radial colour gradient 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 // object { ninho } // the buildings } // DISPLAY FINAL OBJECT --------------------------------------------------------------------------- object { landshare rotate <0, -105.9, 0> translate <0, 0, -5.5> } // END OF PROGRAM ---------------------------------------------------------------------------------