%! % % From: greid@adobe.com (Glenn Reid) % Newsgroups: comp.lang.postscript % Subject: Re: curveto heart wanted % Date: 6 Apr 89 15:50:59 GMT % % In article <5060@cs.Buffalo.EDU> milun@cs.Buffalo.EDU (Davin Milun) writes: % >I'm looking for Postscript code which draws a heart shape (not a biological % >one!). I assume that curveto's would be the easiest, or using arc's. % % I wrote this program a long time ago (and it exemplefies a lot of bad % programming, so please don't flame me). It is really a bumper sticker, % and I thought it would be entertaining to post the whole thing, but you % have to surgically remove the heart from the middle of the file % yourself (it's a very short program). % % Cheers, % Glenn Reid % Adobe % print a PostScript bumper sticker... /LMargin 55 def /in. {72 mul} def 90 rotate 0 -612 translate /PTsize 150 def /Times-Roman findfont PTsize scalefont setfont LMargin 350 moveto gsave (PS ) show /saveobj save def /showpage {} def 340 310 translate 1.8 1.8 scale /heart { /height exch def currentpoint /Y exch def /X exch def /half height 2 div def half neg half rlineto half neg half 0 height half half rcurveto half half height 0 half half neg rcurveto closepath } def 0 0 moveto 1 in. heart .5 setgray fill showpage saveobj restore grestore 0 PTsize .9 mul neg rmoveto ({ honk } if) show showpage