Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 03 Apr 2016 09:40:54 -0500 From: Scott Hemphill Newsgroups: comp.lang.postscript Subject: Re: How does 'arc' work? References: <356283f9-d422-4515-8bd6-5ad0cf625f07@googlegroups.com> <2240fb7d-ff33-4281-b837-a2b119198179@googlegroups.com> Reply-To: hemphill@alumni.caltech.edu Date: Sun, 03 Apr 2016 10:40:53 -0400 Message-ID: <87zitaycui.fsf@hemphills.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:aYNw3s1yktVD/Xb0s1zVHqc5kPE= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 65 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-aUq/SVyKa2zx1xJXFZCHRJSA/Fkiyl6ZlTP/yL17YH6C3CvTBG3N3/mf/DGz+cVOw4nLC8WeR3PBT4w!wDWI/fGhdAEHP9JMaxd/yHfxILQGBSS817DNgxul2wALGnHs3mR2Pug= 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: 3293 Xref: csiph.com comp.lang.postscript:2485 jdaw1 writes: > All the above reasoning was about 90° angles. What about smaller angles? What above reasoning? > For the Bézier curve, obviously the two outer control points are at > the y=sin() x=cos() ends of the segment of the circle. Obviously the > two inner control points are at an angle that is tangent to that > segment of the circle. This leaves one missing parameter: how far away > are the inner control points? > > For 90° of the unit circle, 0.552, as discussed above. I didn’t > realise until recently that 90° is a special case: extrapolating the > distances for smaller angles to 90° would give 0.552285, the 0.552 > crossover happening near 89.9582°. > > For code to generate numbers, and subsequent analysis, see > http://www.jdawiseman.com/2016/20160401_bezier_arcs.ps > http://www.jdawiseman.com/2016/20160401_bezier_arcs.xlsx > > Comment and improvements welcomed. > > Do any readers of this forum know the actual angle→distance formula? For real PostScript? Feed this to your printer. Modify it as desired. ======================================================================== %!PS % What is the distance of an inner Bezier curve control point to the outer % point as a function of angle in an "arc" operator /dist { /angle exch def gsave newpath 0 0 1000 0 angle arc {pop pop} {pop pop} {pop pop pop pop exch pop} {} pathforall grestore 1000 div } bind def /tmpstr 20 string def % I use paper size "letter" /in { 72 mul } bind def /Times-Roman findfont 10 scalefont setfont /lineskip 12 def /nl { 1 in y moveto /y y lineskip sub def } bind def /y 10 in def nl 10 10 90 { dup tmpstr cvs show ( ) show dist tmpstr cvs show nl } for showpage ======================================================================== Scott -- Scott Hemphill hemphill@alumni.caltech.edu "This isn't flying. This is falling, with style." -- Buzz Lightyear