Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 16 Jul 2013 18:34:45 -0500 From: John Deubert Organization: Acumen Training Newsgroups: comp.lang.postscript Date: Tue, 16 Jul 2013 16:34:45 -0700 Message-ID: <2013071616344532779-john@acumentrainingcom> References: <87fvvfde6v.fsf@Aspire.decebal.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: Rainbow printing User-Agent: Unison/2.1.10 Lines: 56 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-EHoDBvff+sBGQIYvA5/C45hPTFFp+YI57gTIY/U6pEnswkczTSO4rnZjfeXLJPshzb838GVivLlVb/S!JApQiD53BfmY5GE9CxIh7fx/ccObGZEtGMQXYFoIQSe9AIloVqDn+chV6hMe9Xut5ABV X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2257 Xref: csiph.com comp.lang.postscript:1462 On 2013-07-15 15:40:24 +0000, Cecil Westerhof said: > I would like to print things with a rainbow stripe. So the top would > be red, the bottom would be violet and the other colours would be in > between. Is it possible to do this? I'd be inclined to do this with a level 1 technique, using sethsbcolor: % ========== cut here ============= /center { 300 400 } def /innerRadius 100 def /outerRadius 150 def /innerColor .8 def % Purple, close enough /outerColor 0 def % red /steps 100 def /deltaR outerRadius innerRadius sub steps div def /deltaColor outerColor innerColor sub steps div def /color innerColor def deltaR setlinewidth innerRadius deltaR outerRadius { center 3 -1 roll 0 180 arc color 1 1 sethsbcolor stroke /color color deltaColor add def } for showpage % ========== cut here ============= Not technically as smooth (or nearly as cool) as using smooth shading, but gets the job done. - John -- ======== John Deubert Acumen Training PostScript & PDF Engineering Classes & Consulting www.acumentraining.com Learn PostScript programming techniques Read the free Acumen Journal acumentraining.com/acumenjournal.html