From batten@kodak.com Fri Apr 3 15:29:19 1992 Received: from Kodak.COM by uhura.cc.rochester.edu (4.1/1.16) id AA17216; Fri, 3 Apr 92 15:28:56 EST Received: from cygnus.kodak.com by Kodak.COM (5.61+/2.1-Eastman Kodak) id AA02950; Fri, 3 Apr 92 15:26:47 -0500 Reply-To: batten@kodak.com Received: by cygnus.Kodak.COM (4.1/SMI-4.1) id AA06464; Fri, 3 Apr 92 15:27:00 EST Date: Fri, 3 Apr 92 15:27:00 EST From: batten@kodak.com (James Batten) Message-Id: <9204032027.AA06464@cygnus.Kodak.COM> To: lm03_cif Subject: flower Status: OR >From marshall@windsor.Software.ORG Tue Mar 31 13:18:57 1992 To: batten@Kodak.COM Subject: PostScript program to print the flower Using the PostScript code I posted last month, I wrote a description for your flower after I learned how to make it. Just send it to a PostScript printer. ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- %! /inch { 72.27 0.5 mul mul } bind def /Helvetica findfont 0.5 inch scalefont setfont /bubble_end_radius 0.5 inch def /bubble_end_diameter bubble_end_radius 2 mul def /bubble { % rotation length => - % rotation length label => - % see if the optional label was present dup type /stringtype eq { /bubble_label_present? true def /bubble_label exch def } { /bubble_label_present? false def } ifelse /bubble_length exch def rotate % draw the bubble capsule shape bubble_end_radius bubble_end_radius neg moveto bubble_length bubble_end_diameter sub 0 rlineto currentpoint bubble_end_radius add bubble_end_radius 270 90 arc bubble_end_diameter bubble_length sub 0 rlineto currentpoint bubble_end_radius sub bubble_end_radius 90 270 arc closepath % fill in the bubble with white gsave 1 setgray fill grestore % outline the bubble with black stroke % draw the optional label bubble_label_present? { bubble_length 2 div bubble_label stringwidth pop 2 div sub bubble_end_diameter 0.2 mul neg moveto bubble_label show } if % move to the end of the bubble bubble_length 0 translate 0 0 moveto } bind def /double_bubble { % rotation length => - exch rotate dup % if we are pointing up, draw right bubble then left bubble matrix currentmatrix 1 get 0 lt { gsave 0 bubble_end_radius 2 div neg translate 0 exch bubble grestore gsave 0 bubble_end_radius 2 div translate 0 exch bubble grestore } { % we are pointing down, draw left bubble then right bubble gsave 0 bubble_end_radius 2 div translate 0 exch bubble grestore gsave 0 bubble_end_radius 2 div neg translate 0 exch bubble grestore } ifelse % rotate so that it looked like two /bubble's were called 180 rotate } bind def /tail_end_radius 0.1 inch def /tail_end_diameter tail_end_radius 2 mul def /tail { % rotation length => - /tail_length exch def rotate % draw the tail shape -1 tail_end_radius neg moveto tail_length tail_end_diameter sub 0 rlineto currentpoint tail_end_radius add tail_end_radius 270 90 arc tail_end_diameter tail_length sub 1 add 0 rlineto % fill in the tail with white gsave 1 setgray fill grestore % outline the tail with black stroke % move to the start of the tail tail_length tail_end_diameter sub 0 translate 0 0 moveto } bind def % Jim Batten's flower 300 40 translate 90 9 inch bubble -90 3 inch double_bubble 0 3 inch double_bubble 90 6 inch bubble -135 45 2 div add 5 inch double_bubble -135 5 inch double_bubble -135 5 inch double_bubble -135 5 inch double_bubble -135 5 inch double_bubble -135 5 inch double_bubble -135 5 inch double_bubble -135 5 inch double_bubble 45 2 div neg 2 inch bubble 0 1 inch tail showpage