🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1848

Re: Big polygons

#1848
From: Andi Loesch
Date: Fri, 21 Aug 1992 07:29
45 lines
2187 bytes
delahunt@adobe.com (Jim DeLaHunt) writes:

>In article <4eVm0Lq00awAMCPkkW@andrew.cmu.edu> am2q+@andrew.cmu.edu 
>(Andrew Newell Mickish) writes:
>>I need a strategy for printing polygons with an arbitrary number of
>>vertices.  So I guess the question comes down to how do I deal with a 
>>very large number of parameters to a function?

>In general, write your script in such a way that it the interpreter
>consumes code as soon as it receives it.  For instance, don't do
>  143.2 246.0 .... (1000 coordinate pairs in reverse order here)
>  1000 {moveto} repeat 

>Send the coordinates and consume them at once.
>  143.2 246.0 lineto 141.59 240.0 lineto ... (998 more "x y lineto" sets)

>If you are concerned about data size, then define an abbreviation for 
>"lineto".  You can also reduce data size by sending the difference between
>coordinates, and by eliminating insignificant digits etc.
>  % in prolog
>  /l /lineto load def	/r /rlineto load def
>  % in script
>  143.2 246.0 l -1.41 -6 r ... (998 more "x y r" sets)

>>Thanks,
>>
>>--Andrew Mickish

>You're welcome!
>	--Jim DeLaHunt, Developer Support, Adobe Systems Incorporated	
>delahunt@adobe.com	...!{apple,decwrl}!adobe!delahunt      +1-415-962-3790
>In matters of style my word is law!  I work for Developer Support.  :-)

But what happens if the length of the polygon becomes too large? If you only want to plot it, you can "stroke" it and everything is ok. How to proceeed when you want to FILL it???

thanks

Andi


--
  Andreas Loesch	Phone   : (+49 89)3209 4086
  Univ. Muenchen	FAX     : (+49 89)3209 4059
  Am Coulombwall 1	E-mail  : Andi.Loesch@Physik.Uni-Muenchen.DE
W-8046 Garching
Technical Details
Message-ID: <loesch.714382187@hera>
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!zrz.tu-berlin.de!cs.tu-berlin.de!fauern!LRZnews!loesch
References: <4eVm0Lq00awAMCPkkW@andrew.cmu.edu> <1992Aug21.034404.29633@adobe.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!zrz.tu-berlin.de!cs.tu-berlin.de!fauern!LRZnews!loesch
From: loesch@bl.physik.tu-muenchen.de (Andi Loesch)
Subject: Re: Big polygons
Message-ID: <loesch.714382187@hera>
Sender: news@news.lrz-muenchen.de (Mr. News)
Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
References: <4eVm0Lq00awAMCPkkW@andrew.cmu.edu> <1992Aug21.034404.29633@adobe.com>
Date: Fri, 21 Aug 1992 07:29:47 GMT
Lines: 45