// Persistence of Vision Ray Tracer Scene Description File // File: cubeetcsource.pov // Vers: 3.1 // Desc: Platonic solids plus some isozonohedra with rhombohedra // decompositions // - the golden triacontrahedron icosahedron and dodecahedron // and the ordinary rhombic dodecahedron // Date: May 1999 // Auth: Robert Walker // #version 3.1; #include "colors.inc" global_settings { assumed_gamma 1.0 } #declare AREA_LIGHT = 1;//true; //switch off for faster rendering #declare ZOOM = 1;//small to go closer and enlarge size of figure in image #declare HALF_CUBE_EDGE_LENGTH = 3;// used as basis for relative scale of all the figures, except that the text for // any labels is of fixed height // - change to a larger value for smaller labels //has no effect on apparent size of figure #declare MAX_ITERATIONS = 1;// Number of times to iterate the construction outwards, // scaling by phi*phi each time so that the icosahedron // touches the vertices of the dodecahedron (outermost figure) // of the previous iteration //Change these to 1 (true) or 0 (false) to draw or not the relevant shapes or labels #declare DRAW_CUBE = 1; #declare DRAW_TETRAHEDRON = 1; #declare DRAW_OCTAHEDRON = 1; #declare DRAW_ICOSAHEDRON = 1; #declare DRAW_DODECAHEDRON = 1; #declare DRAW_RHOMBIC_DODECAHEDRON = 0; #declare DRAW_RHOMBIC_DODECAHEDRON_AS_RHOMBOHEDRA = 0; #declare DRAW_TRIACONTRAHEDRON = 0; #declare DRAW_SMALL_STELLATED_DODECAHEDRON = 0; #declare DRAW_RHOMBOHEDRON = 0; #declare DRAW_OBLATE_GOLDEN_RHOMBOHEDRON = 0; #declare DRAW_PROLATE_GOLDEN_RHOMBOHEDRON = 0; #declare DRAW_GOLDEN_DODECAHEDRON = 0; #declare DRAW_GOLDEN_DODECAHEDRON2= 0;//the one at the front of the triacontrahedron #declare DRAW_GOLDEN_ICOSAHEDRON = 0; #declare DRAW_GOLDEN_RHOMBS_IN_DODECAHEDRON = 0; #declare DRAW_GOLDEN_RHOMBS_IN_ICOSAHEDRON = 0; #declare DRAW_GOLDEN_RHOMBS_IN_TRIACONTRAHEDRON = 0; #declare DRAW_SPHERE = 1; #declare DRAW_LABELLED_RHOMBIC_DODECAHEDRON_AXIS = 0; #declare DRAW_LABELLED_GOLDEN_AXES = 0; #declare DRAW_TETRAHEDRON_LABELS = 0; #declare DRAW_CUBE_LABELS = 0; #declare DRAW_OCTAHEDRON_LABELS = 0; #declare DRAW_ICOSAHEDRON_LABELS = 0; #declare DRAW_DODECAHEDRON_LABELS = 0; #declare DRAW_CUBECOORDS = 0; #declare HIGHLIGHT_CENTRE_PROLATE_RHOMBOHEDRON=0; #declare HIGHLIGHT_GOLDEN_DODECAHEDRON=0; #declare HIGHLIGHT_GOLDEN_ICOSAHEDRON=0; #declare HIGHLIGHT_GOLDEN_RHOMBS_IN_DODECAHEDRON=0; #declare HIGHLIGHT_GOLDEN_RHOMBS_IN_ICOSAHEDRON=0; #declare HIGHLIGHT_SMALL_STELLATED_DODECAHEDRON_FACE=0; #declare HIGHLIGHT_PARALLEL_GREAT_DODECAHEDRON_FACES=0; #if(DRAW_DODECAHEDRON_LABELS) #declare DRAW_CUBE_LABELS = 1;// because cube vertices are all dodecahedron vertices #end #if(DRAW_CUBE_LABELS) #declare DRAW_TETRAHEDRON_LABELS = 1;// because tetrahedron vertices are all cube vertices #end //Colours #declare CubeColour = NewMidnightBlue; #declare DodecahedronColour = Cyan; #declare TetrahedronColour = Red; #declare OctahedronColour = Black; #declare IcosahedronColour = Green; #declare RhombicDodecahedronColour = Silver; #declare RhombicTriacontrahedronColour = Magenta; #declare SmallStellatedDodecahedronColour = Red; #declare SmallStellatedDodecahedronHighlightColour = Yellow; #declare GreatDodecahedronHighlightColour = Silver; #declare GoldenRhombohedronColour = Gold; #declare GoldenAxisColour = Blue; #declare RhombicDodecahedronAxisColour = Blue; #declare RhombicHighlightColour=Cyan; #declare DRAW_METALLIC=0; //mathematical constants - golden ratio and it's inverse #declare phi = (1+sqrt(5))/2; #declare rho = 1/phi; //widths of the edges #declare STANDARD_WIDTH = 0.02*HALF_CUBE_EDGE_LENGTH; #if(DRAW_OBLATE_GOLDEN_RHOMBOHEDRON|DRAW_PROLATE_GOLDEN_RHOMBOHEDRON |DRAW_GOLDEN_RHOMBS_IN_DODECAHEDRON|DRAW_GOLDEN_RHOMBS_IN_ICOSAHEDRON|DRAW_GOLDEN_RHOMBS_IN_TRIACONTRAHEDRON |DRAW_GOLDEN_DODECAHEDRON|DRAW_GOLDEN_DODECAHEDRON2|DRAW_GOLDEN_ICOSAHEDRON ) #declare STANDARD_WIDTH = 0.04*HALF_CUBE_EDGE_LENGTH;//the golden rhombs may need wider lines to show up the structure clearly #end #declare CUBE_EDGE_WIDTH = STANDARD_WIDTH; #declare DODECAHEDRON_EDGE_WIDTH = STANDARD_WIDTH; #declare TETRAHEDRON_EDGE_WIDTH = STANDARD_WIDTH; #declare ICOSAHEDRON_EDGE_WIDTH = STANDARD_WIDTH; #declare OCTAHEDRON_EDGE_WIDTH = STANDARD_WIDTH; #declare RHOMBIC_DODECAHEDRON_EDGE_WIDTH = STANDARD_WIDTH; #declare GOLDEN_EDGE_WIDTH = STANDARD_WIDTH; //scaling #declare ICOSAHEDRON_SCALE = 1;//set to phi*phi to intersect the dodecahedron edges at right angles; #declare OCTAHEDRON_SCALE = 1;//set to 2 to intersect the cube edges at right angles; #declare SPHERE_RADIUS=10*HALF_CUBE_EDGE_LENGTH; #if(DRAW_TRIACONTRAHEDRON|DRAW_OBLATE_GOLDEN_RHOMBOHEDRON|DRAW_PROLATE_GOLDEN_RHOMBOHEDRON |DRAW_GOLDEN_RHOMBS_IN_DODECAHEDRON|DRAW_GOLDEN_RHOMBS_IN_ICOSAHEDRON|DRAW_GOLDEN_RHOMBS_IN_TRIACONTRAHEDRON |DRAW_LABELLED_GOLDEN_AXES|DRAW_SMALL_STELLATED_DODECAHEDRON |DRAW_GOLDEN_DODECAHEDRON|DRAW_GOLDEN_DODECAHEDRON2|DRAW_GOLDEN_ICOSAHEDRON ) #declare SPHERE_RADIUS=9*HALF_CUBE_EDGE_LENGTH; #declare ICOSAHEDRON_SCALE = phi*phi;// to intersect the dodecahedron edges at right angles; #end #if(DRAW_SMALL_STELLATED_DODECAHEDRON) #declare SPHERE_RADIUS=8*HALF_CUBE_EDGE_LENGTH; #declare ZOOM = ZOOM*5.3;//small to go closer #declare ICOSAHEDRON_SCALE = phi*phi*phi;//exp(3*log(phi)); #end #if(DRAW_RHOMBIC_DODECAHEDRON|DRAW_RHOMBIC_DODECAHEDRON_AS_RHOMBOHEDRA|DRAW_RHOMBOHEDRON |DRAW_LABELLED_RHOMBIC_DODECAHEDRON_AXIS ) #declare OCTAHEDRON_SCALE = 2;// to intersect the cube edges at right angles #end //for more relative scaling of the figures, change values declared within the main while () loop //Light and camera //------------------------------------------------------------------------------ #if(AREA_LIGHT) // An area light (creates soft shadows) // WARNING: This special light can significantly slow down rendering times! light_source { 0*x // light's position (translated below) color rgb 1.0 // light's color // nLightsWide mLightsHigh area_light <8,0,0> <0,0,8> // lights spread out across this distance (x * z) 4,4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light translate <40,80,-40> // position of light } #end #declare PointToLookAt= <0.0,0.0,0.0>; #if(DRAW_OBLATE_GOLDEN_RHOMBOHEDRON|DRAW_PROLATE_GOLDEN_RHOMBOHEDRON |DRAW_GOLDEN_RHOMBS_IN_DODECAHEDRON|DRAW_GOLDEN_RHOMBS_IN_ICOSAHEDRON|DRAW_GOLDEN_RHOMBS_IN_TRIACONTRAHEDRON |DRAW_LABELLED_GOLDEN_AXES |DRAW_GOLDEN_DODECAHEDRON|DRAW_GOLDEN_DODECAHEDRON2|DRAW_GOLDEN_ICOSAHEDRON ) #declare PointToLookAt= ; #end camera { location <6*HALF_CUBE_EDGE_LENGTH*ZOOM,2.5*HALF_CUBE_EDGE_LENGTH*ZOOM,-4*HALF_CUBE_EDGE_LENGTH*ZOOM> direction 1.5*z right 4/3*x look_at PointToLookAt #if(DRAW_SMALL_STELLATED_DODECAHEDRON) angle 12 #end } sky_sphere { pigment { gradient y color_map { [0.0 color blue 0.6] [1.0 color rgb 1] } } } light_source { 0*x // light's position (translated below) color red 1.0 green 1.0 blue 1.0 // light's color translate <-30,30,-30> } //----------------------------------------------------------------------------------- //some macros for drawing edges #macro Cycle(Vector) #declare Vector = ; #end #macro DrawEdge(Source,Destination,EDGE,EdgeColour) #if(DRAW_METALLIC) cylinder{Source,Destination,EDGE texture{pigment {EdgeColour}finish{metallic 1}}} #else cylinder{Source,Destination,EDGE texture{pigment {EdgeColour}finish{specular 1}}} #end #end #macro Invert(Vector,Inversion) #local Vector2 = <0,0,0>; #declare Vector2 = Vector; #if(Inversion.x != 0) #declare Vector2 = <-Vector2.x,Vector2.y,Vector.z>; #end #if(Inversion.y != 0) #declare Vector2 = <-Vector2.x,-Vector2.y,Vector.z>; #end #if(Inversion.z != 0) #declare Vector2 = <-Vector2.x,Vector2.y,-Vector.z>; #end #declare Vector = Vector2; #end #macro CycleDrawEdge(Source,Destination,EDGE,EdgeColour) DrawEdge(Source,Destination,EDGE,EdgeColour) Cycle(Source) Cycle(Destination) DrawEdge(Source,Destination,EDGE,EdgeColour) Cycle(Source) Cycle(Destination) DrawEdge(Source,Destination,EDGE,EdgeColour) Cycle(Source) Cycle(Destination)// to put them back as they were #end #macro DrawTriangle(Vertex1,Vertex2,Vertex3,EDGE,EdgeColour) DrawEdge(Vertex1,Vertex2,EDGE,EdgeColour) DrawEdge(Vertex2,Vertex3,EDGE,EdgeColour) DrawEdge(Vertex3,Vertex1,EDGE,EdgeColour) #end #macro DrawEdgeWithInversion(Inversion,Source,Destination,EDGE,EdgeColour) //example, DrawEdgeWithInversion(<1,0,0>,...) //to draw the edge from Source to Destination, and again with the x coords inverted in sign //Inverts the sign for all the coords for which Inversion has a value > = 1 //and draws the edge again DrawEdge(Source,Destination,EDGE,EdgeColour) Invert(Source,Inversion) Invert(Destination,Inversion) DrawEdge(Source,Destination,EDGE,EdgeColour) Invert(Source,Inversion) Invert(Destination,Inversion)//to put them back as they were #end #macro CycleDrawEdgeWithInversion(Inversion,Source,Destination,EDGE,EdgeColour) CycleDrawEdge(Source,Destination,EDGE,EdgeColour) Invert(Source,Inversion) Invert(Destination,Inversion) CycleDrawEdge(Source,Destination,EDGE,EdgeColour) Invert(Source,Inversion) Invert(Destination,Inversion)//to put them back as they were #end #declare i = 0; #while (i0) #declare HALF_CUBE_EDGE_LENGTH = HALF_CUBE_EDGE_LENGTH*phi*phi; #end #declare i = i+1; #declare CUBE_EDGE_LENGTH = 2*HALF_CUBE_EDGE_LENGTH ; #declare OCH = HALF_CUBE_EDGE_LENGTH*OCTAHEDRON_SCALE;//value to use (as is and inverted in sign) for coords for octahedron #declare TTH = HALF_CUBE_EDGE_LENGTH;//For coords for tetrahedron #declare DDH = HALF_CUBE_EDGE_LENGTH;//For coords for inscribed cube for dodecahedron //w and h are needed for the edges of the dodecahedron, which is //obtained by adding two vertices outside each face of the cube, //at positions w in from the edge,and h above the face //where for a cube of edge 1, //defining theta = 3*pi/5-pi/2 = pi/10 //w = rho*sin(theta) //h = sqrt((rho*cos(theta))**2-1/4) . //Using sin(theta)=rho/2 these simplify to //w=rho*rho/2 and h=rho/2 #declare w = rho*rho*HALF_CUBE_EDGE_LENGTH; #declare h = rho*HALF_CUBE_EDGE_LENGTH; #declare HALF_CUBE_EDGE_LENGTH_FOR_ICOSAHEDRON = HALF_CUBE_EDGE_LENGTH*ICOSAHEDRON_SCALE; #declare RHO = rho*HALF_CUBE_EDGE_LENGTH_FOR_ICOSAHEDRON; #declare RHOSQ = (1-rho)*HALF_CUBE_EDGE_LENGTH_FOR_ICOSAHEDRON; //1-rho = rho*rho #if(DRAW_TETRAHEDRON) //edges of the inscribed tetrahedron DrawEdge(,,TETRAHEDRON_EDGE_WIDTH,TetrahedronColour) DrawEdge(,<-TTH,-TTH,TTH>,TETRAHEDRON_EDGE_WIDTH,TetrahedronColour) DrawEdge(,<-TTH,TTH,-TTH>,TETRAHEDRON_EDGE_WIDTH,TetrahedronColour) CycleDrawEdge(<-TTH,-TTH,TTH>,<-TTH,TTH,-TTH>,TETRAHEDRON_EDGE_WIDTH,TetrahedronColour) #end //tetrahedron vertices #declare A = ; #declare B = <-TTH,-TTH,TTH>; #declare C = <-TTH,TTH,-TTH>; #declare D = ; #if(DRAW_CUBE|DRAW_CUBECOORDS) //edges of the cube #declare sourcecoords = array[3] #declare destinationcoords = array[3] #declare sourcecoords[0] = -HALF_CUBE_EDGE_LENGTH; #while (sourcecoords[0] <= HALF_CUBE_EDGE_LENGTH) //loop over all values of first two components of sourcecoords #declare sourcecoords[1] = -HALF_CUBE_EDGE_LENGTH; #while (sourcecoords[1] <= HALF_CUBE_EDGE_LENGTH) #declare sourcecoords[2] = -HALF_CUBE_EDGE_LENGTH;//set third component of sourcecoords to -1 #while (sourcecoords[2] <= HALF_CUBE_EDGE_LENGTH) #declare pos = 0; #if(DRAW_CUBECOORDS) #declare label = concat("",str(sourcecoords[0]/HALF_CUBE_EDGE_LENGTH,0,0) ,str(sourcecoords[1]/HALF_CUBE_EDGE_LENGTH,0,0) ,str(sourcecoords[2]/HALF_CUBE_EDGE_LENGTH,0,0) ) text { ttf "timrom.ttf" label 0.1,0 pigment {CubeColour } translate } #end //connect each of the sourcecoords to the three vertices that //differ in sign in exactly one coord #while (pos<3)//loop over the index for sourcecoords #declare pos2 = 0; //first set destinationcoords to sourcecoords #while (pos2<3) #declare destinationcoords[pos2] = sourcecoords[pos2]; #declare pos2 = pos2+1; #end //change sign of destinationcoords[pos] to a negative number //If it is negative already,ignore,as it will be drawn or has been drawn the other way round #if(destinationcoords[pos] = HALF_CUBE_EDGE_LENGTH) #declare destinationcoords[pos] = -HALF_CUBE_EDGE_LENGTH; #if(DRAW_CUBE) DrawEdge ( , ,CUBE_EDGE_WIDTH,CubeColour ) #end #if(DRAW_CUBECOORDS) #declare label = concat("",str(destinationcoords[0]/HALF_CUBE_EDGE_LENGTH,0,0) ,str(destinationcoords[1]/HALF_CUBE_EDGE_LENGTH,0,0) ,str(destinationcoords[2]/HALF_CUBE_EDGE_LENGTH,0,0) ) text { ttf "timrom.ttf" label 0.1,0 pigment { CubeColour } translate } #end #end #declare pos = pos+1; #end #declare sourcecoords[2] = sourcecoords[2]+CUBE_EDGE_LENGTH; #end #declare sourcecoords[1] = sourcecoords[1]+CUBE_EDGE_LENGTH; #end #declare sourcecoords[0] = sourcecoords[0]+CUBE_EDGE_LENGTH; #end #end //other cube vertices not on the tetrahedron when the tetrahedron is scaled to join vertices of the cube #declare E = <-HALF_CUBE_EDGE_LENGTH,HALF_CUBE_EDGE_LENGTH,HALF_CUBE_EDGE_LENGTH>; #declare F = ; #declare G = ; #declare H = <-HALF_CUBE_EDGE_LENGTH,-HALF_CUBE_EDGE_LENGTH,-HALF_CUBE_EDGE_LENGTH>; #if(DRAW_OCTAHEDRON) //edges of the octahedron DrawEdgeWithInversion(<0,1,0>,,<0,OCH,0>,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) DrawEdgeWithInversion(<0,1,0>,<0,0,OCH>,<0,OCH,0>,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) DrawEdgeWithInversion(<0,1,0>,<-OCH,0,0>,<0,OCH,0>,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) DrawEdgeWithInversion(<0,1,0>,<0,0,-OCH>,<0,OCH,0>,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) DrawEdge(<0,0,-OCH>,,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) DrawEdge(<0,0,OCH>,,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) DrawEdge(<0,0,OCH>,<-OCH,0,0>,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) DrawEdge(<0,0,-OCH>,<-OCH,0,0>,OCTAHEDRON_EDGE_WIDTH,OctahedronColour) #end //octahedron vertices #declare OC1 = ; #declare OC2 = <-OCH,0,0>; #declare OC3 = <0,OCH,0>; #declare OC4 = <0,-OCH,0>; #declare OC5 = <0,0,OCH>; #declare OC6 = <0,0,-OCH>; #if(DRAW_DODECAHEDRON) //construction added to top face of cube CycleDrawEdgeWithInversion(<0,1,0>,<0,DDH+h,w-DDH>,DODECAHEDRON_EDGE_WIDTH,DodecahedronColour) CycleDrawEdgeWithInversion(<0,1,0><-DDH,DDH,-DDH>,<0,DDH+h,w-DDH>,DODECAHEDRON_EDGE_WIDTH,DodecahedronColour) CycleDrawEdgeWithInversion(<0,1,0>,<0,DDH+h,DDH-w>,DODECAHEDRON_EDGE_WIDTH,DodecahedronColour) CycleDrawEdgeWithInversion(<0,1,0><-DDH,DDH,DDH>,<0,DDH+h,DDH-w>,DODECAHEDRON_EDGE_WIDTH,DodecahedronColour) CycleDrawEdgeWithInversion(<0,1,0><0,DDH+h,w-DDH>,<0,DDH+h,DDH-w>,DODECAHEDRON_EDGE_WIDTH,DodecahedronColour) #end //dodecahedron vertices not on cube (when to the appropriate scale) - capitals from I to S #declare I = <0,DDH+h,w-DDH>; #declare J = <0,DDH+h,DDH-w>; #declare K = <0,-DDH-h,w-DDH>; #declare L = <0,-DDH-h,DDH-w>; #declare M = ; #declare N = ; #declare O = ; #declare P = ; #declare Q = ; #declare R = <-DDH-h,w-DDH,0>; #declare S = <-DDH-h,DDH-w,0>; #declare T = ; #if(DRAW_ICOSAHEDRON) //icosahedron with vertices at divisions of edges of octahedron in the golden ratio //Have swapped the first two coords in what follows - were // <0,RHO <0,-RHO ,,<0,RHOSQ,RHO>,ICOSAHEDRON_EDGE_WIDTH,IcosahedronColour) CycleDrawEdgeWithInversion(<0,1,1>,,<0,-RHOSQ,RHO>,ICOSAHEDRON_EDGE_WIDTH,IcosahedronColour) CycleDrawEdgeWithInversion(<0,1,1>,<0,RHOSQ,RHO>,<0,-RHOSQ,RHO>,ICOSAHEDRON_EDGE_WIDTH,IcosahedronColour) //inversion of x coords of first two of the above CycleDrawEdgeWithInversion(<0,1,1>,<-RHO,0,RHOSQ>,<0,RHOSQ,RHO>,ICOSAHEDRON_EDGE_WIDTH,IcosahedronColour) CycleDrawEdgeWithInversion(<0,1,1>,<-RHO,0,RHOSQ>,<0,-RHOSQ,RHO>,ICOSAHEDRON_EDGE_WIDTH,IcosahedronColour) #end //icosahedron vertices #declare aa = ; #declare bb = <-RHOSQ,RHO,0>; #declare cc = ; #declare dd = <-RHOSQ,-RHO,0>; #declare ee = <0,RHOSQ,RHO>; #declare ff = <0,-RHOSQ,RHO>; #declare gg = <0,RHOSQ,-RHO>; #declare hh = <0,-RHOSQ,-RHO>; #declare ii = ; #declare jj = ; #declare kk = <-RHO,0,RHOSQ>; #declare ll = <-RHO,0,-RHOSQ>; //label vertices picture to help to see which to join together to make the other shapes // - need to set HALF_CUBE_EDGE_LENGTH to //some larger number than 1 when using this as the letters are of fixed height #if(DRAW_ICOSAHEDRON_LABELS) text{ttf "timrom.ttf" "a" 0.1,0 pigment {IcosahedronColour }translate aa} text{ttf "timrom.ttf" "b" 0.1,0 pigment {IcosahedronColour }translate bb} text{ttf "timrom.ttf" "c" 0.1,0 pigment {IcosahedronColour }translate cc} text{ttf "timrom.ttf" "d" 0.1,0 pigment {IcosahedronColour }translate dd} text{ttf "timrom.ttf" "e" 0.1,0 pigment {IcosahedronColour }translate ee} text{ttf "timrom.ttf" "f" 0.1,0 pigment {IcosahedronColour }translate ff} text{ttf "timrom.ttf" "g" 0.1,0 pigment {IcosahedronColour }translate gg} text{ttf "timrom.ttf" "h" 0.1,0 pigment {IcosahedronColour }translate hh} text{ttf "timrom.ttf" "i" 0.1,0 pigment {IcosahedronColour }translate ii} text{ttf "timrom.ttf" "j" 0.1,0 pigment {IcosahedronColour }translate jj} text{ttf "timrom.ttf" "k" 0.1,0 pigment {IcosahedronColour }translate kk} text{ttf "timrom.ttf" "l" 0.1,0 pigment {IcosahedronColour }translate ll} #end #if(DRAW_TETRAHEDRON_LABELS) text{ttf "timrom.ttf" "A" 0.1,0 pigment {TetrahedronColour }translate A} text{ttf "timrom.ttf" "B" 0.1,0 pigment {TetrahedronColour }translate B} text{ttf "timrom.ttf" "C" 0.1,0 pigment {TetrahedronColour }translate C} text{ttf "timrom.ttf" "D" 0.1,0 pigment {TetrahedronColour }translate D} #end #if(DRAW_CUBE_LABELS) text{ttf "timrom.ttf" "E" 0.1,0 pigment {CubeColour }translate E} text{ttf "timrom.ttf" "F" 0.1,0 pigment {CubeColour }translate F} text{ttf "timrom.ttf" "G" 0.1,0 pigment {CubeColour }translate G} text{ttf "timrom.ttf" "H" 0.1,0 pigment {CubeColour }translate H} #end #if(DRAW_OCTAHEDRON_LABELS) text{ttf "timrom.ttf" "1" 0.1,0 pigment {OctahedronColour }translate OC1} text{ttf "timrom.ttf" "2" 0.1,0 pigment {OctahedronColour }translate OC2} text{ttf "timrom.ttf" "3" 0.1,0 pigment {OctahedronColour }translate OC3} text{ttf "timrom.ttf" "4" 0.1,0 pigment {OctahedronColour }translate OC4} text{ttf "timrom.ttf" "5" 0.1,0 pigment {OctahedronColour }translate OC5} text{ttf "timrom.ttf" "6" 0.1,0 pigment {OctahedronColour }translate OC6} #end #if(DRAW_DODECAHEDRON_LABELS) text{ttf "timrom.ttf" "I" 0.1,0 pigment {DodecahedronColour }translate I} text{ttf "timrom.ttf" "J" 0.1,0 pigment {DodecahedronColour }translate J} text{ttf "timrom.ttf" "K" 0.1,0 pigment {DodecahedronColour }translate K} text{ttf "timrom.ttf" "L" 0.1,0 pigment {DodecahedronColour }translate L} text{ttf "timrom.ttf" "M" 0.1,0 pigment {DodecahedronColour }translate M} text{ttf "timrom.ttf" "N" 0.1,0 pigment {DodecahedronColour }translate N} text{ttf "timrom.ttf" "O" 0.1,0 pigment {DodecahedronColour }translate O} text{ttf "timrom.ttf" "P" 0.1,0 pigment {DodecahedronColour }translate P} text{ttf "timrom.ttf" "Q" 0.1,0 pigment {DodecahedronColour }translate Q} text{ttf "timrom.ttf" "R" 0.1,0 pigment {DodecahedronColour }translate R} text{ttf "timrom.ttf" "S" 0.1,0 pigment {DodecahedronColour }translate S} text{ttf "timrom.ttf" "T" 0.1,0 pigment {DodecahedronColour }translate T} #end #if(DRAW_RHOMBIC_DODECAHEDRON) CycleDrawEdgeWithInversion(<1,1,1>,OC1,A,RHOMBIC_DODECAHEDRON_EDGE_WIDTH,RhombicDodecahedronColour) CycleDrawEdgeWithInversion(<1,1,1>,OC1,G,RHOMBIC_DODECAHEDRON_EDGE_WIDTH,RhombicDodecahedronColour) CycleDrawEdgeWithInversion(<1,1,1>,OC1,D,RHOMBIC_DODECAHEDRON_EDGE_WIDTH,RhombicDodecahedronColour) CycleDrawEdgeWithInversion(<1,1,1>,OC1,F,RHOMBIC_DODECAHEDRON_EDGE_WIDTH,RhombicDodecahedronColour) #end #if(HIGHLIGHT_PARALLEL_GREAT_DODECAHEDRON_FACES) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawEdge(aa,ee,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(ee,kk,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(kk,ll,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(ll,gg,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(gg,aa,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(aa,ee,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(ii,jj,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(jj,hh,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(hh,dd,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(dd,ff,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) DrawEdge(ff,ii,GOLDEN_EDGE_WIDTH,GreatDodecahedronHighlightColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; #end #if(DRAW_TRIACONTRAHEDRON|DRAW_SMALL_STELLATED_DODECAHEDRON) #if(DRAW_SMALL_STELLATED_DODECAHEDRON) #declare Colour=SmallStellatedDodecahedronColour; #if(HIGHLIGHT_SMALL_STELLATED_DODECAHEDRON_FACE) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawEdge(gg,ee,GOLDEN_EDGE_WIDTH,SmallStellatedDodecahedronHighlightColour) DrawEdge(ee,jj,GOLDEN_EDGE_WIDTH,SmallStellatedDodecahedronHighlightColour) DrawEdge(jj,bb,GOLDEN_EDGE_WIDTH,SmallStellatedDodecahedronHighlightColour) DrawEdge(bb,ii,GOLDEN_EDGE_WIDTH,SmallStellatedDodecahedronHighlightColour) DrawEdge(ii,gg,GOLDEN_EDGE_WIDTH,SmallStellatedDodecahedronHighlightColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; #end #else #declare Colour=RhombicTriacontrahedronColour; #end CycleDrawEdgeWithInversion(<0,1,0>,aa,A,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<0,1,0>,aa,Q,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<0,1,0>,aa,G,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<0,1,0>,aa,I,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<0,1,0>,aa,J,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<1,1,1>,jj,G,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<1,1,1>,jj,Q,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<1,1,1>,jj,T,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<1,1,1>,jj,D,GOLDEN_EDGE_WIDTH,Colour) CycleDrawEdgeWithInversion(<1,1,1>,jj,P,GOLDEN_EDGE_WIDTH,Colour) #end #declare e1 = A-aa; #declare e2 = Q-aa; #declare e3 = G-aa; #declare e4 = I-aa; #declare e5 = J-aa; #declare e6 = D-jj; //macros for drawing golden rhombohedra, and golden rhomobhedron composition of golden //dodecahedron, golden icosahedron and triacontrahedron #macro DrawRhombus (origin,v1,v2,Colour) DrawEdge(origin,origin+v1,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin,origin+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1,origin+v1+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2,origin+v2+v1,GOLDEN_EDGE_WIDTH,Colour) #end #macro DrawRhombohedron (origin,v1,v2,v3,Colour) DrawRhombus(origin,v1,v2,Colour) DrawRhombus(origin+v3,v1,v2,Colour) DrawEdge(origin,origin+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1,origin+v1+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2,origin+v2+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1+v2,origin+v1+v2+v3,GOLDEN_EDGE_WIDTH,Colour) #end #macro DrawGoldenDodecahedron (origin,v1,v2,v3,v4,Colour) DrawRhombus(origin,v3,v4,Colour) DrawRhombus(origin+v3,v1,v2,Colour) DrawRhombus(origin+v1+v2,v3,v4,Colour) DrawRhombus(origin+v4,v1,v2,Colour) DrawEdge(origin+v1,origin,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1,origin+v1+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1,origin+v1+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1,origin+v1+v4,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v1+v2+v3+v4,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v3+v4,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v2+v4,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v2+v3,GOLDEN_EDGE_WIDTH,Colour) #end #macro DrawGoldenIcosahedron (origin,v1,v2,v3,v4,v5,Colour) DrawRhombus(origin,v3,v4,Colour) DrawRhombus(origin+v4,v1,v2,Colour) DrawEdge(origin,origin+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v3,origin+v3+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v1+v2+v3+v4,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v3+v4,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v2+v4,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3+v4,origin+v2+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v3,origin+v3+v5,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v3+v2,origin+v2+v3+v5,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v4,origin+v4+v5,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v4+v1,origin+v4+v1+v5,GOLDEN_EDGE_WIDTH,Colour) DrawRhombus(origin+v5,v1,v3,Colour) DrawRhombus(origin+v5,v1,v4,Colour) DrawEdge(origin+v5+v1,origin+v5+v1+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v5+v2+v3,origin+v5+v2+v3+v1,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v5+v1+v3,origin+v5+v1+v3+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v5+v3,origin+v5+v3+v2,GOLDEN_EDGE_WIDTH,Colour) DrawRhombus(origin+v5+v1+v2,v3,v4,Colour) DrawEdge(origin+v5,origin,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v5+v1+v4,origin+v5+v4+v1+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v5+v4+v1+v2,origin+v5+v4+v1+v2+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v5+v4+v1+v2,origin+v4+v1+v2,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v4+v1+v2,origin+v4+v1+v2+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v4+v1+v2+v3,origin+v4+v1+v2+v3+v5,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v2+v3,origin+v1+v2+v3,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1+v2+v3,origin+v1+v2+v3+v5,GOLDEN_EDGE_WIDTH,Colour) DrawEdge(origin+v1+v2+v3,origin+v1+v2+v3+v4,GOLDEN_EDGE_WIDTH,Colour) #end #macro DrawGoldenRhombsInDodecahedron (origin,v1,v2,v3,v4,Colour) DrawRhombohedron(origin,v1,v2,v3,Colour) DrawRhombohedron(origin,v1,v2,v4,Colour) DrawRhombohedron(origin,v2,v3,v4,Colour) DrawRhombohedron(origin+v2,v1,v4,v3,Colour) #if(HIGHLIGHT_GOLDEN_DODECAHEDRON) declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawGoldenDodecahedron (origin,v1,v2,v3,v4,RhombicHighlightColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; #end #end #macro DrawGoldenRhombsInIcosahedron (origin,v1,v2,v3,v4,v5,Colour) //two golden dodecahedra intersecting in an oblate rhombohedron #if(HIGHLIGHT_GOLDEN_RHOMBS_IN_DODECAHEDRON) declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawGoldenRhombsInDodecahedron (origin+v3,v2,v1,-v3,v5,RhombicHighlightColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; #else DrawGoldenRhombsInDodecahedron (origin+v3,v2,v1,-v3,v5,Colour) #end DrawGoldenRhombsInDodecahedron (origin,v1,v2,v3,v4,Colour) DrawRhombohedron(origin,v1,v4,v5,Colour) DrawRhombohedron(origin+v1,v2,v4,v5,Colour) DrawRhombohedron(origin+v1+v2,v3,v4,v5,Colour) #if(HIGHLIGHT_GOLDEN_ICOSAHEDRON) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawGoldenIcosahedron (origin,v1,v2,v3,v4,v5,RhombicHighlightColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; #end #end #macro DrawGoldenRhombsInTriacontrahedron (origin,v1,v2,v3,v4,v5,v6,Colour) #if(HIGHLIGHT_GOLDEN_RHOMBS_IN_ICOSAHEDRON) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawGoldenRhombsInIcosahedron (origin,v1,v2,v3,v4,v5,RhombicHighlightColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; #else DrawGoldenRhombsInIcosahedron (origin,v1,v2,v3,v4,v5,Colour) #end //The star of prolate rhombohedra DrawRhombohedron(origin+v4,v1,v2,v6,Colour) DrawRhombohedron(origin+v4,v2,v3,v6,Colour) DrawRhombohedron(origin+v4,v3,-v4,v6,Colour) DrawRhombohedron(origin+v4,-v4,v5,v6,Colour) DrawRhombohedron(origin+v4,v1,v5,v6,Colour) //The oblate rhombohedra about the star DrawRhombohedron(origin+v4+v1,v2,v5,v6,Colour) DrawRhombohedron(origin+v4+v2,v1,v3,v6,Colour) DrawRhombohedron(origin+v4+v3,v2,-v4,v6,Colour) DrawRhombohedron(origin,v3,v5,v6,Colour) DrawRhombohedron(origin+v4+v5,v1,-v4,v6,Colour) #end #if(DRAW_GOLDEN_RHOMBS_IN_TRIACONTRAHEDRON) DrawGoldenRhombsInTriacontrahedron (0,e1,e2,e3,-e4,e5,-e6,GoldenRhombohedronColour) #end #if(DRAW_GOLDEN_RHOMBS_IN_ICOSAHEDRON) DrawGoldenRhombsInIcosahedron (0,e1,e2,e3,-e4,e5,GoldenRhombohedronColour) #end #if(DRAW_GOLDEN_RHOMBS_IN_DODECAHEDRON) DrawGoldenRhombsInDodecahedron (0,e1,e2,e3,-e4,GoldenRhombohedronColour) #end #if(DRAW_GOLDEN_ICOSAHEDRON) DrawGoldenIcosahedron (0,e1,e2,e3,-e4,e5,GoldenRhombohedronColour) #end #if(DRAW_GOLDEN_DODECAHEDRON) DrawGoldenDodecahedron (0,e1,e2,e3,-e4,GoldenRhombohedronColour) #end #if(DRAW_GOLDEN_DODECAHEDRON2) DrawGoldenDodecahedron(-e6,e3,e2,-e4,e6,GoldenRhombohedronColour) #end #if(DRAW_OBLATE_GOLDEN_RHOMBOHEDRON) DrawRhombohedron (0,e1,e2,e3,GoldenRhombohedronColour) #end #if(DRAW_PROLATE_GOLDEN_RHOMBOHEDRON) DrawRhombohedron (0,e1,e2,e6,GoldenRhombohedronColour) #end #if(HIGHLIGHT_CENTRE_PROLATE_RHOMBOHEDRON) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawRhombohedron (0,e1,e2,-e4,RhombicHighlightColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; #end #if(DRAW_LABELLED_GOLDEN_AXES) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawEdge(0,e1,GOLDEN_EDGE_WIDTH,GoldenAxisColour) DrawEdge(0,e2,GOLDEN_EDGE_WIDTH,GoldenAxisColour) DrawEdge(0,e3,GOLDEN_EDGE_WIDTH,GoldenAxisColour) DrawEdge(0,e4,GOLDEN_EDGE_WIDTH,GoldenAxisColour) DrawEdge(0,e5,GOLDEN_EDGE_WIDTH,GoldenAxisColour) DrawEdge(0,e6,GOLDEN_EDGE_WIDTH,GoldenAxisColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; text{ttf "timrom.ttf" "e1" 0.1,0 pigment {GoldenAxisColour }translate e1} text{ttf "timrom.ttf" "e2" 0.1,0 pigment {GoldenAxisColour }translate e2} text{ttf "timrom.ttf" "e3" 0.1,0 pigment {GoldenAxisColour }translate e3} text{ttf "timrom.ttf" "e4" 0.1,0 pigment {GoldenAxisColour }translate e4} text{ttf "timrom.ttf" "e5" 0.1,0 pigment {GoldenAxisColour }translate e5} text{ttf "timrom.ttf" " e6" 0.1,0 pigment {GoldenAxisColour }translate e6} #end #declare a1 = A-OC1; #declare a2 = F-OC1; #declare a3 = G-OC1; #declare a4 = D-OC1; #if(DRAW_LABELLED_RHOMBIC_DODECAHEDRON_AXIS) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH*1.01; DrawEdge(0,a1,GOLDEN_EDGE_WIDTH,RhombicDodecahedronAxisColour) DrawEdge(0,a2,GOLDEN_EDGE_WIDTH,RhombicDodecahedronAxisColour) DrawEdge(0,a3,GOLDEN_EDGE_WIDTH,RhombicDodecahedronAxisColour) DrawEdge(0,a4,GOLDEN_EDGE_WIDTH,RhombicDodecahedronAxisColour) #declare GOLDEN_EDGE_WIDTH=GOLDEN_EDGE_WIDTH/1.01; text{ttf "timrom.ttf" "a1" 0.1,0 pigment {RhombicDodecahedronAxisColour }translate a1} text{ttf "timrom.ttf" "a2" 0.1,0 pigment {RhombicDodecahedronAxisColour }translate a2} text{ttf "timrom.ttf" "a3" 0.1,0 pigment {RhombicDodecahedronAxisColour }translate a3} text{ttf "timrom.ttf" "a4" 0.1,0 pigment {RhombicDodecahedronAxisColour }translate a4} #end #if(DRAW_RHOMBOHEDRON) DrawRhombohedron(0,a1,a2,a3,RhombicDodecahedronColour) #end #if(DRAW_RHOMBIC_DODECAHEDRON_AS_RHOMBOHEDRA) DrawRhombohedron(0,a1,a2,a4,RhombicDodecahedronColour) DrawRhombohedron(0,a1,a3,a4,RhombicDodecahedronColour) DrawRhombohedron(a4,a1,a2,a3,RhombicDodecahedronColour) DrawRhombohedron(a1+a4,a2,a3,-a4,RhombicDodecahedronColour) #end #end//for while (i // center of sphere SPHERE_RADIUS // radius of sphere // scale <1,2,1> // <= Note: Spheres can become ellipses by uneven scaling texture { pigment { gradient y color_map { [0.0 color blue 0.6] [1.0 color rgb 1] } scale } //pigment {Blue}finish{specular 1} } } #end