#include "colors.inc" #include "golds.inc" #include "metals.inc" #include "woods.inc" #include "transforms.inc" #include "shapes.inc" #include "math.inc" #include "glass.inc" #include "stones.inc" #include "textures.inc" #include "stars.inc" #include "shapes2.inc" #include "shapesq.inc" #declare p1= union { box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Red} rotate<0,45,0> } } #declare p2= union{ box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Red} rotate<0,45,45> } } #declare p3= union{ box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} rotate<0,0,0> } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Red} Axis_Rotate_Trans(<1,1,1>, 60) } } #declare p4= union{ box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} rotate<45,0,0> } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Red} rotate<0,45,0> } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Yellow} rotate<0,0,45> } } #declare p5= union{ box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} Axis_Rotate_Trans(<1,0,1>, 120) } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Red} Axis_Rotate_Trans(<1,0,1>, 60) } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Yellow} Axis_Rotate_Trans(<1,0,1>, 0) } } #declare p6= union{ box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Green} Axis_Rotate_Trans(<1,1,1> 60) } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Yellow} Axis_Rotate_Trans(<1,1,1>, 30) } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} Axis_Rotate_Trans(<1,1,1>, 0) } } #declare p7= union{ box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Green} rotate<45,0,0> } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Yellow} rotate<90,0,0> } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} rotate<0,45,0> } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Red} rotate<0,0,45> } } #declare p9= union{ box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Green} } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Yellow} Axis_Rotate_Trans(<1,1,1>, 45) } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Blue} Axis_Rotate_Trans(<-1,1,-1>, 45) } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{Red} Axis_Rotate_Trans(<1,-1,-1>, 45) } box { <-1, -1, -1> // one corner position < 1, 1, 1> // other corner position pigment{White} Axis_Rotate_Trans(<-1,-1,1>, 45) } } camera { location <0, 0, 20> look_at <0, 0, 0> right x*image_width/image_height } light_source { <0, 0, 20> color rgb 1.0 } object {p9 translate <5,0,0>} object {p1 translate <-5,0,0> rotate<90,0,0>} object {p2 translate <5,5,0>} object {p3 translate <5,-5,0>} object {p4 translate <-5,5,0>} object {p5 translate <-5,-5,0>} object {p6 translate <0,0,0>} object {p7 translate <0,5,0>}