// Persistence Of Vision raytracer version 2.0 // The Laxey Wheel, Isle of Man // Based on the view on a postcard sent to me by me mum. // Useful POVRay practice! // Author: Simon Smith // All measurements are in feet; dimensions are roughly true to the original #include "colors.inc" #include "textures.inc" // Textures and Colours ******************************************************************** #declare WhiteWashed = texture { Dull pigment { rgb <0.98, 0.98, 0.98> } // Off-white normal { bumps 0.12 scale <2.5, 0.75, 2.5> } finish { ambient 0.3 diffuse 0.4 } } #declare DirtyWhiteWash = texture { Dull pigment { rgb <0.94, 0.90, 0.86> } // Grey / Brown mix, hopefully normal { bumps 0.15 scale <2, 1, 2> } // dirt makes the bumps show up more finish { ambient 0.2 diffuse 0.4 } } #declare BrownStone = texture { Dull pigment { rgb <0.91, 0.76, 0.65> } // Light Wood finish { ambient 0.4 diffuse 0.2 } } #declare RedPaint = texture { pigment { rgb <0.80, 0.20, 0.15> } // Custom Red finish { ambient 0.3 diffuse 0.85 reflection 0.1 specular 0.7 } } #declare BlackPaint = texture { // Gloss paint ... pigment { rgb <0.12, 0.12, 0.12> } // Very Dark Grey finish { ambient 0.3 diffuse 0.85 reflection 0.1 specular 0.7 } } #declare WhitePaint = texture { // Gloss paint ... pigment { rgb <0.95, 0.95, 0.95> } // Grey 95 finish { ambient 0.3 diffuse 0.85 reflection 0.1 specular 0.7 } } #declare BlackLeadPaint = texture { // Gloss paint ... pigment { rgb <0.16, 0.19, 0.17> } // Dark Grey finish { ambient 0.3 phong 0.75 phong_size 15 diffuse 0.7 } } #declare RoofTiles = texture { pigment { marble scale 0.75 turbulence 0.0 colour_map { [0.00 colour rgb <0.18, 0.31, 0.31> ] // Dark Slate Grey [0.95 colour rgb <0.18, 0.31, 0.31> ] [0.95 colour rgb <0.17, 0.17, 0.17> ] // Dark Grey [1.00 colour rgb <0.17, 0.17, 0.17> ] } } finish { ambient 0.7 phong 0.75 phong_size 15 diffuse 0.4 } } // #declared radii #declare wheelrad = 36.5 #declare arch1rad = 16 #declare arch2rad = 16 #declare arch3rad = 9 #declare arch4rad = 12 #declare arch5rad = 9 #declare arch6rad = 4 #declare arch7rad = 4 #declare arch8rad = 8 #declare arch9rad = 8 // #declared fractions (avoids typos) #declare half = 0.5 #declare quart = 0.25 #declare threequart = 0.75 #declare abit = 0.05 #declare bitmore = 0.1 #declare some = 1 // #declared x-coordinates #declare axlex = 44.5 // centre of wheel axle #declare leftcasing = 0 #declare rightcasing = 105 #declare leftupper = 4 #declare rightupper = 84 #declare bigarch1 = 24 #declare bigarch2 = 65 #declare mediumarch = axlex #declare smallarch1 = 18 #declare smallarch2 = 71 #declare spiral = 95 // centre of spiral staircase #declare hutleft = 118 #declare hutright = 132 #declare hutmiddle = (hutleft+hutright)/2 #declare aqleft = 108 #declare aqright = 184 #declare arch6 = 121 #declare arch7 = 135 #declare arch8 = 150 #declare arch9 = 171 // #declared y-coordinates #declare axley = 37.5 // centre of wheel axle #declare underground = -15 #declare ground = 0 // top of foundations #declare level1 = 18 // top of level 1, bottom of 'aqueduct' #declare level2 = 33 // top of level 2 #declare level3 = 76 // top of spiral staircase #declare level4 = 41 // top of the 'aqueduct' #declare hutroof = 15 // #declared z-coordinates #declare front = 0 // front of casing, front of level 1 walkway #declare slice1 = 4 // level 1 walkway #declare slice2 = 8 // level 2 walkway #declare wheelfront = 9 #declare wheelback = 19 #declare slice3 = 20 // wheel is 10' wide, 1' clearance each side #declare slice4 = 24 // back of level 2 #declare back = 28 // back of level 1 #declare centreline = (wheelfront+wheelback)/2 #declare hutfront = 4 #declare hutback = 16 #declare aqfront = 19 #declare aqback = 23 // The World ******************************************************************************* #declare LHSide = <-100, axley, 0> #declare RHSide = <175, axley, 25> camera { location <150, axley+15, -150> direction <0, 0, 1.5> up <0, 1, 0> right <4/3, 0, 0> look_at } light_source { <-100, 200, -150> colour rgb <0.95, 0.95, 0.95> } // About as sunny as it gets in the U.K. // Sky sphere #declare Sky = sphere { <0, 0, 0>, 100000 } object { Sky pigment { rgb <0.20, 0.60, 0.80> } // Sky Blue finish { Luminous } } // Floor plane plane { y, 0 rotate <4, 0, 3> translate -7*y clipped_by { Sky } bounded_by { clipped_by } pigment { color rgb <0.20, 1.00, 0.40> } // Custom Green finish { crand 0.05 /* This value dithers the colors */ ambient 0.2 diffuse 0.3 } normal { waves 1.0 frequency 2000 scale 50000 } } // Object Definitions ********************************************************************** // Foundations ///////////////////////////////////////////////////////////////////////////// #declare uFoundations = union { box { , } cylinder { , , quart} cylinder { , , quart } cylinder { , , quart } sphere { , quart } sphere { , quart } } #declare Foundations = difference { object { uFoundations } box { , // water channel } bounded_by { box { , } } clipped_by { bounded_by } } // Lower Casing //////////////////////////////////////////////////////////////////////////// #declare uLowerCasing = union { box { , } box { , } // line of bricks cylinder { , , arch1rad+threequart texture { BlackLeadPaint } } cylinder { , , arch2rad+threequart texture { BlackLeadPaint } } } #declare LowerCasing = difference { object { uLowerCasing } cylinder { , // 1' clearance , wheelrad+1 } box { , // water channel } cylinder { , , arch1rad+threequart } cylinder { , , arch2rad+threequart } cylinder { , // archway , arch1rad } cylinder { , // archway , arch2rad } bounded_by { box { , } } clipped_by { bounded_by } } // Upper Casing //////////////////////////////////////////////////////////////////////////// #declare uUpperCasing = union { box { , } box { , } // line of bricks cylinder { , // platform , 6.5 } cylinder { , // platform , 6.5 } } #declare UpperCasing = difference { object { uUpperCasing } cylinder { , // 1' clearance , wheelrad+1 } cylinder { , , arch3rad } // small arch cylinder { , , arch4rad } // medium arch cylinder { , , arch5rad } // small arch bounded_by { box { , } } clipped_by { bounded_by } } // Spiral tower //////////////////////////////////////////////////////////////////////////// #declare Awkward = intersection { cylinder { , , 11 } box { , inverse } plane { <10, 22, 10>, 0 translate } } // Plane chosen so that the spiral staircase follows the cut surface // HINT: gradient of plane is 10/22 in both the x and z directions // Diameter of cylinder is 22 feet. Try it out on graph paper #declare SpiralBounds = union { cylinder { , , 14 } cone { , 8, , 6 } } #declare SpiralTower = union { cylinder { , , 13 } cylinder { , // line of bricks , 13+quart } torus { 7, quart translate } // embellishment torus { 4.1, quart translate } // embellishment cylinder { , , 7 } cone { , 7, , 4 } object { Awkward } bounded_by { SpiralBounds } clipped_by { bounded_by } } // Wooden walkway and supports ///////////////////////////////////////////////////////////// #declare Walkway = union { cylinder { , , 5.5 } box { , } } #declare Mudguard = difference { cylinder { , , 38.5 } cylinder { , , 37.75 } plane { x, axlex+6 } plane { y, level2+22 } } #declare MajorSupport = union { box { <0, level2, slice2-0.5>, <0.5, level3+1, wheelfront> } box { <0, level2, wheelback>, <0.5, level3+1, slice3+0.5> } box { <0, level3-1, wheelfront>, <0.5, level3, wheelback> } } #declare MinorSupport = union { box { <0, level2+23, slice2>, <0.5, level3-1, slice2+0.5> } box { <0, level2+23, slice3-0.5>, <0.5, level3-1, slice3> } box { <0, level3-1, slice2-0.5>, <0.5, level3, slice3+0.5> } } #declare CrossBar1 = difference { box { <53.5, level2+22, slice2>, } box { <53.5, level2+23, slice2-1>, } box { <0, 0, -1>, <3, 2, 2> rotate 26.5*z translate } cylinder { , , 3 } texture { WhitePaint pigment { // 'Mind your head' red gradient x scale <100, 1, 1> // scaled from the origin colour_map { [0.00 colour rgb <0.95, 0.95, 0.95> ] // Off-white [0.85 colour rgb <0.95, 0.95, 0.95> ] // offset = 85 feet [0.85 colour rgb <0.80, 0.20, 0.15> ] // Custom Red [0.90 colour rgb <0.80, 0.20, 0.15> ] // offset = 90 feet [0.90 colour rgb <0.95, 0.95, 0.95> ] // Off-white [1.00 colour rgb <0.95, 0.95, 0.95> ] } } } } #declare CrossBar2 = box { <53.5, level2+22, slice3-0.5>, } #declare WideVertical = box { <81, level2, wheelfront>, <82, level3, wheelback> } #declare SmallCrossBar = union { box { <80.5, level2, slice2>, <81, level2+10, slice3> } box { <68.5, level2+10, slice2-0.25>, <80.5, level2+10.25, slice2> } box { <68.5, level2+10, slice3>, <80.5, level2+10.25, slice3+0.25> } } #declare BoxMinusWheel = difference { box { , } cylinder { , , 37 } } #declare Supports = union { object { Walkway } object { WideVertical } object { Mudguard } // Well that's what it looks like object { MajorSupport translate 53*x } object { MajorSupport translate 68*x } object { MinorSupport translate 60*x } object { MinorSupport translate 75*x } object { CrossBar1 } object { CrossBar2 } object { SmallCrossBar } bounded_by { BoxMinusWheel } clipped_by { bounded_by } } /* // Water wheel ///////////////////////////////////////////////////////////////////////////// #declare OuterWheel = difference { cylinder { , , 36.5 } cylinder { , , 35 } } #declare Axis = union { cylinder { , , 1 } cylinder { , , 6 } cylinder { , , 6 } box { <-2, -2, -1> <2, 2, 1> translate } box { <-2, -2, -1> <2, 2, 1> translate } cylinder { , , 1 texture { RedPaint } } cylinder { , , 1 texture { RedPaint } } texture { BlackLeadPaint } } #declare SpokeBeam = difference { box { <5, -0.6, -0.4> <35.5, 0.6, 0.4> } plane { <0.1, 35, 0>, 0 inverse translate <5, 0.6, 0> } plane { <0.1, -35, 0>, 0 inverse translate <5, -0.6, 0> } } #declare SpokeCap = box { <35.3, -0.6, -0.42> <35.7, 0.6, 0.42> texture { BlackLeadPaint } } #declare SpokeHolder = box { <20, -0.6, -0.45> <20.5, 0.6, 0.45> texture { BlackLeadPaint } } #declare Spike = box { <5, -0.1, -0.42> <7, 0.7, 0.42> texture { BlackLeadPaint } } #declare SpokePair = union { object { SpokeBeam } object { SpokeHolder } object { SpokeCap } object { Spike } object { SpokeBeam translate (wheelback-wheelfront)*z } object { SpokeHolder translate (wheelback-wheelfront)*z } object { SpokeCap translate (wheelback-wheelfront)*z } object { Spike translate (wheelback-wheelfront)*z } } #declare SpokePitch = 360/25 #declare Spokes = union { object { SpokePair rotate 1*SpokePitch*z } object { SpokePair rotate 2*SpokePitch*z } object { SpokePair rotate 3*SpokePitch*z } object { SpokePair rotate 4*SpokePitch*z } object { SpokePair rotate 5*SpokePitch*z } object { SpokePair rotate 6*SpokePitch*z } object { SpokePair rotate 7*SpokePitch*z } object { SpokePair rotate 8*SpokePitch*z } object { SpokePair rotate 9*SpokePitch*z } object { SpokePair rotate 10*SpokePitch*z } object { SpokePair rotate 11*SpokePitch*z } object { SpokePair rotate 12*SpokePitch*z } object { SpokePair rotate 13*SpokePitch*z } object { SpokePair rotate 14*SpokePitch*z } object { SpokePair rotate 15*SpokePitch*z } object { SpokePair rotate 16*SpokePitch*z } object { SpokePair rotate 17*SpokePitch*z } object { SpokePair rotate 18*SpokePitch*z } object { SpokePair rotate 19*SpokePitch*z } object { SpokePair rotate 20*SpokePitch*z } object { SpokePair rotate 21*SpokePitch*z } object { SpokePair rotate 22*SpokePitch*z } object { SpokePair rotate 23*SpokePitch*z } object { SpokePair rotate 24*SpokePitch*z } object { SpokePair rotate 25*SpokePitch*z } } #declare BlackRings = difference { cylinder { <0, 0, -0.3> <0, 0, 10.3>, 20.3 } cylinder { <0, 0, -1> <0, 0, 11> 20 } cylinder { <0, 0, 0.3> <0, 0, 9.7> 21 } texture { BlackLeadPaint } } #declare Wheel = union { object { OuterWheel } object { Axis } object { Spokes translate } object { BlackRings translate } } */ // Entrance //////////////////////////////////////////////////////////////////////////////// #declare Entrance = difference { box { <104, ground, 12>, <159, level1, 23> } plane { <7, 0, -41>, 0 inverse translate <117, 0, 12> } // wall is not all orthogonal cylinder { <107, underground, 21>, // hole for 'plunger' <107, level1+some, 21>, 2 } cylinder { <113, 12, 11>, <113, 12, 13>, 2 } // 'hollow' above door cylinder { <113, 5, 11>, <113, 5, 13>, 2 } // part of door arch box { <111, ground, 11>, <115, 5, 13> } // part of door arch bounded_by { box { <103, ground, 11>, <160, level1, 24> } } clipped_by { bounded_by } } // Stone hut /////////////////////////////////////////////////////////////////////////////// #declare Roof_V_Shape = intersection { plane { <-3, 7, 0>, 0 } plane { <3, 7, 0>, 0 } } #declare Roof = intersection { object { Roof_V_Shape translate } object { Roof_V_Shape inverse translate } texture { RoofTiles } } #declare Hut = difference { box { , } box { , // doorway } object { Roof_V_Shape inverse translate } } #declare StoneHut = union { object { Hut } box { , // door texture { BlackPaint } } object { Roof } bounded_by { box { , } } clipped_by { bounded_by } } // Aqueduct //////////////////////////////////////////////////////////////////////////////// #declare HalfDisc4 = difference { cylinder { <0, 0, -abit>, <0, 0, abit>, 5 texture { BlackLeadPaint } } plane { y, 0 } } #declare HalfDisc8 = difference { cylinder { <0, 0, -abit>, <0, 0, abit>, 9.5 texture { BlackLeadPaint } } plane { y, 0 } } #declare Disc2 = cylinder { <0, 0, -abit>, <0, 0, abit>, 2.75 texture { BlackLeadPaint } } #declare Disc1point5 = cylinder { <0, 0, -abit>, <0, 0, abit>, 2.25 texture { BlackLeadPaint } } #declare AqueBox = union { // Basic aqueduct shape, plus decorative paint box { , } object { HalfDisc4 translate } // Painted black semicircle object { HalfDisc4 translate } // Painted black semicircle object { HalfDisc4 translate } // Painted black semicircle object { HalfDisc4 translate } // Painted black semicircle object { HalfDisc8 translate } // Painted black semicircle object { HalfDisc8 translate } // Painted black semicircle object { HalfDisc8 translate } // Painted black semicircle object { HalfDisc8 translate } // Painted black semicircle object { Disc1point5 translate } // Painted black ring object { Disc1point5 translate } // Painted black ring object { Disc1point5 translate } // Painted black ring object { Disc1point5 translate } // Painted black ring object { Disc1point5 translate } // Painted black ring object { Disc1point5 translate } } // Painted black ring #declare Aqueduct = difference { object { AqueBox } plane { <23, -27, 0>, 0 translate } // Ramp cylinder { , // Part of arch , arch6rad } cylinder { , // Part of arch , arch7rad } cylinder { , // Part of arch , arch8rad } cylinder { , // Part of arch , arch9rad } box { , // Part of arch } box { , // Part of arch } box { , // Part of arch } box { , // Part of arch } cylinder { , // Hole , 1.5 } cylinder { , // Hole , 1.5 } cylinder { , // Hole , 1.5 } } // The Scene ******************************************************************************* object { Foundations texture { WhiteWashed } } object { LowerCasing texture { WhiteWashed } } object { UpperCasing texture { WhiteWashed } } object { SpiralTower texture { WhiteWashed } } //object { Wheel texture { RedPaint } } object { Supports texture { WhitePaint } } object { Entrance texture { DirtyWhiteWash } } object { StoneHut texture { WhiteWashed } } object { Aqueduct texture { WhiteWashed } }