pyramid.inc




#ifdef(Pyramid_Inc) // do nothing #else #declare Pyramid_Inc = version #version 3.0 //Pyramid.inc #declare pyramid = difference { box { <0, 0, 0>, <1, 0.5, 1> } box { <0, 0, -0.1>, <1, 1, 1.1> rotate <0, 0, 45> translate <1, 0, 0> } box { <0, 0, -0.1>, <1, 1, 1.1> rotate <0, 0, 45> translate <0, 0, 0> } box { <-0.1, 0, 0>, <1.1, 1, 1> rotate <-45, 0, 0> } box { <-0.1, 0, 0>, <1.1, 1, 1> rotate <-45, 0, 0> translate <0, 0, 1> } } #declare meta_pyramid1 = union { object { pyramid } object { pyramid translate <1,0,0> } object { pyramid translate <0,0,1> } object { pyramid translate <1,0,1> } object { pyramid translate <0.5,0.5,0.5> } scale 0.5 } #declare meta_pyramid2 = union { object { meta_pyramid1 } object { meta_pyramid1 translate <1,0,0> } object { meta_pyramid1 translate <0,0,1> } object { meta_pyramid1 translate <1,0,1> } object { meta_pyramid1 translate <0.5,0.5,0.5> } scale 0.5 } #declare meta_pyramid3 = union { object { meta_pyramid2 } object { meta_pyramid2 translate <1,0,0> } object { meta_pyramid2 translate <0,0,1> } object { meta_pyramid2 translate <1,0,1> } object { meta_pyramid2 translate <0.5,0.5,0.5> } scale 0.5 } #declare meta_pyramid4 = union { object { meta_pyramid3 } object { meta_pyramid3 translate <1,0,0> } object { meta_pyramid3 translate <0,0,1> } object { meta_pyramid3 translate <1,0,1> } object { meta_pyramid3 translate <0.5,0.5,0.5> } scale 0.5 } #version Pyramid_Inc #end