# Copyright © 2009 by David Bremner <bremner@unb.ca>
# Distributed under the same terms as sketch (http://www.frontiernet.net/~eugene.ressler)

def O  (0,0,0)
def e1 (0,0,1)
def e2 (0,1,0)
def e3 (1,0,0)
def n2 (0,-1,0)
def n3 (-1,0,0)
def J  [0,1,0]
def eye (-2,0.5,3)

def support  sweep[cull=false,fill opacity=0.25,fill=blue!20]  {1, translate ([2,0,-2])} line (-0.25,-0.5,1.75)(-1.25,1.5,0.75)

put { view((eye),(O),[J]) then scale(2) }{
    repeat {4,rotate(90,(O),[J])}
    	   {
	     polygon[cull=false,color=orange,draw=black,line width=1pt,fill opacity=0.75] (e1)(e3)(e2)
	     polygon[cull=false,color=orange,draw=black,line width=1pt,fill opacity=0.75] (e1)(n2)(e3)
#	     dots (e1)(e2)(e3)(n2)
	     }
   	     {support}
	     put {translate([-0.5,-1,-0.5])} {support}
	     polygon[cull=false,color=red,draw=white,linewidth=1pt]  (e1)(n3)(e2)
}     

global{
	language tikz
#	set [cull=false]
}