%!PS-Adobe-2.0 %%BoundingBox: 0 0 372 180 /w 372 def /h 180 def 1 setlinejoin 1 setlinecap (ps3d.inc) run (cube.inc) run (epsetup.inc) run [-0.25 1 1 0 ] set-light /sc 32 def [0 0 6 1] set-eye /dA 8 def /A 17 120 add def /dA 10 def [0 1 0] A rotate3d { page-begin /E get-virtual-eye def /L get-virtual-light def /red [ 1 0 0 ] def /pink [ 0.6 0.6 1.0] def E 2 get 0 gt { /shift0 -1 def /shift1 1 def /c0 red def /c1 pink def }{ /shift0 1 def /shift1 -1 def /c1 red def /c0 pink def } ifelse gsave3d 0 -0.5 0 translate3d 0 0 shift0 translate3d /E0 get-virtual-eye def newpath cube { % [ polygon normal ] aload pop /N exch def /P exch def N E0 dot-product 0 ge { P P length 1 sub get aload pop moveto3d P { aload pop lineto3d } forall gsave /s L N dot-product [0.30 0.30 0.80 1] shade def c0 0 get s mul c0 1 get s mul c0 2 get s mul setrgbcolor fill grestore stroke } if } forall grestore3d gsave3d 0 -0.5 0 translate3d 0 0 shift1 translate3d /E1 get-virtual-eye def newpath cube { % [ polygon normal ] aload pop /N exch def /P exch def N E1 dot-product 0 ge { P P length 1 sub get aload pop moveto3d P { aload pop lineto3d } forall gsave /s L N dot-product [0.30 0.30 0.80 1] shade def c1 0 get s mul c1 1 get s mul c1 2 get s mul setrgbcolor fill grestore stroke } if } forall grestore3d page-end [0 1 0 ] dA rotate3d } loop