dkovar@bbn.com (David C. Kovar) (05/05/88)
Expires: Sender: Followup-To: Keywords: Odd question: Does anyone have any PostScript routines to draw flowers of any sort? -David Kovar DKovar@BBN.COM
reid@decwrl.dec.com (Brian Reid) (05/05/88)
In article <24203@bbn.COM> dkovar@bbn.com (David C. Kovar) writes: > Odd question: Does anyone have any PostScript routines to draw flowers >of any sort? >-David Kovar Here's the one I use. It draws a side view, for architectural elevations, of a simple cartoon flower plant with two leaves. Depending on the size that you want to draw it you can piddle with the "npetals" parameter; it's set to 4 in this version. % draw a 1-unit-high flower rooted at the current point % (Brian Reid, April 1985) /flower { gsave 1 200 div dup scale currentpoint translate % stem 0 10 moveto -6 7 -7 70 2 95 curveto 6 105 17 152 12 183 curveto gsave 1 setgray 9 setlinewidth stroke grestore 7 setlinewidth stroke % right leaf newpath -20 0 moveto 10 0 lineto 13 35 43 90 71 120 curveto 40 105 -3 40 -20 0 curveto gsave 1 setgray fill grestore 2 setlinewidth stroke % left leaf -20 0 moveto 10 0 lineto 0 40 -30 96 -55 140 curveto -35 85 -19 35 -20 0 curveto gsave 1 setgray fill grestore 2 setlinewidth stroke % petals gsave 12 183 translate 1 0.7 scale /npetals 4 def /petalangle 360 npetals div def 1 setlinewidth /petlength 55 def /dy petalangle sin petlength mul def petalangle 2 div rotate npetals {newpath 0 0 moveto petlength dy petlength dy neg 0 0 curveto gsave 1 setgray fill grestore stroke petalangle rotate} repeat newpath 0 0 12 0 360 arc fill grestore grestore } bind def