# © 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 up [0,0,1]	
def eye (2,3,3)
def A (-1,-1,-2) 
def B (1,1,-2)
def C (1,-1,-2)
def D (-1,1,-2)

def C1 (1,-1,2)
def D1 (-1,1,2)

put { view((eye),(O),[up]) then scale(2) }{
  repeat {4,rotate(90,(0,0,0),[0,0,1])}
       	polygon[fill=red!30,fill opacity=0.35,cull=false](-1,-1,-1)(1,-1,-1)(1,-1,1)
	(-1,-1,1)

   repeat {2,rotate(180,(0,0,0),[0,0,1])}
       	polygon[fill=blue!20,fill opacity=0.25,cull=false](-1,-1,-2)(1,-1,-2)(1,-1,2)
	(-1,-1,2)(-1,-1,-2)
polygon[fill=green,cull=false](A)(C)(B)(D)
dots[color=red] (A)(B)	
dots[color=olive] (C1)(D1)(C)(D)
line[arrows=->,line width=1pt](C)(C1)
line[arrows=->,line width=1pt](D)(D1)
line(A)(C1)
line(B)(D1)

}


global{
	language tikz
#	set [cull=false]

}

