//Displaying the stella octangula using POV-Ray //Load some interesting colors and textures #include "colors.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" #include "woods.inc" //Describe the location of the camera and where it is aimed camera { location <.5,2,-4> look_at <0,0,0> } //Define a background color background { color White } //Describe the location and color of the light source light_source { <2,3,-5> color White*3 } //Define the coordinates of the eight vertices #declare p1 = <-1,-1,-1> #declare p2 = <-1,-1,1> #declare p3 = <-1,1,-1> #declare p4 = <-1,1,1> #declare p5 = <1,-1,-1> #declare p6 = <1,-1,1> #declare p7 = <1,1,-1> #declare p8 = <1,1,1> //Define the polygons for each of the four sides of the first tetrahedron. //Notice that the last point must be a repetition of the first. //The number "4" indicates that four points will be listed. #declare f1 = polygon { 4, p1, p4, p6, p1 } #declare f2 = polygon { 4, p1, p4, p7, p1 } #declare f3 = polygon { 4, p1, p6, p7, p1 } #declare f4 = polygon { 4, p4, p6, p7, p4 } //Define the first tetrahedron to be the union of its faces. #declare tetra1 = union { object{f1} object{f2} object{f3} object{f4} } //Give the tetrahedron some texture. #declare tetra1a = object { tetra1 texture { T_Wood1} } //Define the polygons for the the four sides of the second tetrahedron. #declare f5 = polygon { 4, p2, p3, p5, p2 } #declare f6 = polygon { 4, p2, p3, p8, p2 } #declare f7 = polygon { 4, p2, p5, p8, p2 } #declare f8 = polygon { 4, p3, p5, p8, p3 } //Define the second tetrahedron to be the union of its faces. declare tetra2 = union { object{f5} object{f6} object{f7} object{f8} } //Give the second tetrahedron some texture. #declare tetra2a = object { tetra2 texture { T_Wood1 } } //Define a horizontal plane on which to place the tetrahedra (optional). #declare table = object { plane { <0,1,0>,-1 texture { T_Stone18 } } } //List the objects to display tetra1a tetra2a table