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

def diam 2.828427

def O (0,0,0)
def up [0,0,1]	
def eye (2,3,3)
def A (-1,-1,0) 
def B (1,1,0)
def C (1,-1,0)
def D (-1,1,0)

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

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

#   repeat {2,rotate(180,(0,0,0),[0,0,1])}
#       	polygon[fill=blue!20,fill opacity=0.25,cull=false](-1,-1,0)(1,-1,0)(1,-1,2)
#	(-1,-1,2)(-1,-1,0)
polygon[fill=green,cull=false,fill opacity=0.5](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)
line[color=black,arrows=<->,line width=1pt](A)(B)
special |\node[right] at #1 {$\mathsf{diam}$};|(0,0,0)

}


global{
	language tikz
#	set [cull=false]

}

