Cuboctahedron construction using Povray

The cuboctahedron is an Archimedean solid with 6 square faces and 8 triangular ones. The associated question (in the puzzles section) was inspired by a construction using magna-tiles. 

 

The construction of the cuboctahedron was done using Povray. The key object construction from the scene file is given below; essentially we have taken a cube and sliced the corners off using planes! 

The cuboctahedron is an Archimedean solid with 6 square faces and 8 triangular ones. The associated question (in the puzzles section) was inspired by a construction using magna-tiles. 

The construction of the cuboctahedron was done using Povray. The key object construction from the scene file is given below; essentially we have taken a cube and sliced the corners off using planes! 

 

#declare planes = object{
    union{
        plane{<1,1,1>,-2/1.73}
        plane{<1,1,-1>,-2/1.73}
            plane{<1,-1,1>,-2/1.73}
            plane{<-1,1,1>,-2/1.73}
            plane{<-1,1,-1>,-2/1.73}
            plane{<-1,-1,1>,-2/1.73}
            plane{<1,-1,-1>,-2/1.73}
            plane{<-1,-1,-1>,-2/1.73}
                    }
}

object{
    difference{
        box{ <-1,-1,-1>,<1,1,1>
              texture{
                    pigment{
                          color Red
                    }
              }
            }
             object{planes            
                 texture{
                    pigment{
                      color Blue
                    }
              }
         }
    }
rotate <0,35,0>
}