%!PS-Adobe-2.0 %%BoundingBox: 0 0 80 80 % specify the width and height for good placement /w 80 def /h 80 def (ps3d.inc) run % the basic package (cube.inc) run % defining the faces of a cube (epsetup.inc) run % setting up a uniform environment % orthogonal projection: % the eye is in the direction of the positive z-axis [0 0 1 0] set-eye % ------------------------------------------------ page-begin /A 40 def gsave3d 0.6 dup dup scale3d [1 1 1] A rotate3d -0.5 -0.5 -0.5 translate3d % a face is a pair: % array of vertices + normal function % [ [P[0] P[1] ... P[n-1]] n ] % in this skeleton drawing, the normal function is not used cube { % n = normal function 0 get /f exch def % f = polygon /ell f length def newpath f ell 1 sub get aload pop moveto3d f { aload pop lineto3d } forall stroke } forall grestore3d /page-end