home *** CD-ROM | disk | FTP | other *** search
- % @(#) $Header: yoyo.card,v 1.1 90/06/11 02:56:25 jef Exp $
- %
- % yoyo.card - Yoyodyne Propulsion Systems employee ID
- %
- % Copyright (C) 1990 by Jef Poskanzer. All rights reserved.
-
- /yoyo-boxheight cardheight cardmargin 2 mul sub photoheight sub 2 div def
- /yoyo-numwidth yoyo-boxheight diagoffsetfactor mul photowidth add def
- /yoyo-namewidth cardwidth cardmargin 3 mul sub yoyo-numwidth sub def
- /yoyo-logoheight photoheight cardmargin sub def
-
- /yoyo-logodict 50 dict def
- /yoyo-logo { yoyo-logodict begin
-
- /r3 3 sqrt def % useful constants
- /r3d2 r3 2 div def
-
- /h yoyo-logoheight def % height of triangle
- /s h r3d2 div def % side of triangle
-
- /so2 s 2 div def
- /h1 .07 h mul def % height of first horiz line - below PROPUL
- /h2 .15 h mul def % height of second horiz line - below YOYO
- /h3 .3 h mul def % height of third horiz line - above YOYO
- /r1 .12 s mul def % radius of larger circle
- /r1m .95 r1 mul def % a little less than r1
- /h4 .55 h mul def % height of center of circle
- /h5 h4 r1 .7 mul add def % height of center of rocket wake
- /r2 .06 s mul def % radius of smaller circle
- /step .03 s mul def % size of little steps
- /rocketrot -13 def % angle of rocket and tail
- /wakewidth .01 s mul def % line width of rocket wake
- /wakexsize .30 s mul def % x size of rocket wake
- /wakeysize .4 r1 mul def % y size of rocket wake
- /wake1ysize 1.30 wakeysize mul def
- /wake3ysize .70 wakeysize mul def
-
- /gray .25 def
-
- 1 setlinecap
-
- % Rocket wake part 2.
- /rocketwake2 {
- black setgray
- wakewidth setlinewidth
- newpath
- so2 h5 rocketrot wakexsize wakeysize 0 180 ellipser
- stroke
- } def
-
- % Dark triangle.
- /darktriangle {
- 0 0 moveto
- so2 h lineto
- s 0 lineto
- 0 0 lineto
- fill
- } def
-
- % White hollow.
- /whitehollow {
- white setgray
- s h1 moveto
- so2 h1 lineto
- so2 h2 lineto
- .145 s mul neg 0 rlineto
- 0 1.5 h1 mul h2 sub rlineto
- .21 s mul 1.5 h1 mul lineto
- .21 s mul h3 lineto
- so2 r1 sub step sub h4 lineto
- so2 r1 add step add h4 lineto
- s .21 s mul sub h3 lineto
- s h3 lineto
- s h1 lineto
- fill
- } def
-
- % Weird-shaped dark area.
- /darkarea {
- so2 h3 moveto
- r1m neg step neg add 0 rlineto
- 0 step rlineto
- step 0 rlineto
- 0 h4 h3 sub step sub rlineto
- 2 r1m mul 0 rlineto
- 0 h4 h3 sub step sub neg rlineto
- step 0 rlineto
- 0 step neg rlineto
- fill
- } def
-
- % White circle.
- /whitecircle {
- white setgray
- so2 h4 r1 0 360 arc
- fill
- } def
-
- % White circular bite.
- /whitebite {
- white setgray
- s .13 s mul sub h1 2 div r2 add r2 0 360 arc
- fill
- } def
-
- % Rocket.
- /rocket {
- gsave
- so2 h5 translate
- rocketrot rotate
- 0 wake3ysize neg translate
- newpath
- .05 h mul -.034 h mul 0 .17 h mul .05 h mul 90 135 ellipser
- .05 h mul .034 h mul 0 .17 h mul .05 h mul 225 270 ellipser
- closepath
- black setgray fill
- .06 h mul 0 0 .06 h mul .035 h mul 0 360 ellipser
- black setgray fill
- .06 h mul 0 0 .035 h mul .040 h mul 0 360 ellipser
- white setgray fill
- .07 h mul 0 0 .035 h mul .040 h mul 0 360 ellipser
- white setgray fill
- .08 h mul 0 0 .045 h mul .045 h mul 0 360 ellipser
- white setgray fill
- .030 h mul 0 0 .010 h mul .010 h mul 0 360 ellipser
- white setgray fill
- grestore
- } def
-
- % Rocket wake part 3.
- /rocketwake3 {
- wakewidth setlinewidth
- newpath
- so2 h5 rocketrot wakexsize wake3ysize 277 360 ellipser
- stroke
- } def
-
- % Rocket wake part 1.
- /rocketwake1 {
- newpath .9 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 180 190 ellipser
- stroke
- newpath .8 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 190 200 ellipser
- stroke
- newpath .7 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 200 210 ellipser
- stroke
- newpath .6 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 210 220 ellipser
- stroke
- newpath .5 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 220 230 ellipser
- stroke
- newpath .4 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 230 240 ellipser
- stroke
- newpath .3 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 240 250 ellipser
- stroke
- newpath .2 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 250 260 ellipser
- stroke
- newpath .1 wakewidth mul setlinewidth
- so2 h5 rocketrot wakexsize wake1ysize 260 270 ellipser
- stroke
- } def
-
- % Logo text.
- /yoyotext {
- black setgray
- /off1 h2 h1 sub .2 mul def
- so2 off1 add h2 off1 add moveto
- /Helvetica-Oblique findfont h3 h2 sub scalefont setfont
- (YOYODYNE) show
- /offset h2 h1 sub .2 mul def
- so2 off1 add h1 off1 add moveto
- /Helvetica-Oblique findfont h2 h1 sub scalefont setfont
- (PROPULSION SYSTEMS) show
- h 1.7 mul h 0.85 mul moveto
- /Helvetica-Oblique findfont h 0.12 mul scalefont setfont
- ("The Future Begins) showright
- h 1.7 mul h 0.7 mul moveto
- (Tomorrow") showright
- } def
-
- % Finally, actually draw something.
- rocketwake2
- gray setgray darktriangle
- whitehollow
- gray setgray darkarea
- whitecircle
- whitebite
- rocket
- black setgray rocketwake3
- black setgray rocketwake1
- yoyotext
-
- end } def
-
- /yoyo-info {
- cardmargin cardmargin yoyo-boxheight add moveto
- yoyo-namewidth yoyo-boxheight (NAME)
- (John ) FirstName: 0 1 getinterval (. ) LastName:
- strcat strcat strcat diagbox
- cardmargin cardmargin moveto
- yoyo-namewidth yoyo-boxheight (SIGNATURE) () diagbox
- cardwidth cardmargin sub yoyo-numwidth sub
- cardmargin yoyo-boxheight add moveto
- yoyo-numwidth yoyo-boxheight (EMPLOYEE NO.) 4 randdigs diagbox
- cardwidth cardmargin sub yoyo-numwidth sub cardmargin moveto
- yoyo-numwidth yoyo-boxheight (ISSUE DATE) (Nov 1 1938) diagbox
- } def
-
- /yoyo-card {
- cardstart
- black setgray
- 0 setlinewidth
- cardticks
- cardwidth cardmargin sub photowidth sub
- cardheight cardmargin sub photoheight sub moveto
- photowidth photoheight photo
- gsave
- cardmargin cardheight cardmargin sub yoyo-logoheight sub translate
- yoyo-logo
- grestore
- yoyo-info
- cardend
- } def
-
- yoyo-card
-