Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #2485

Re: How does 'arc' work?

From Scott Hemphill <hemphill@hemphills.net>
Newsgroups comp.lang.postscript
Subject Re: How does 'arc' work?
References <356283f9-d422-4515-8bd6-5ad0cf625f07@googlegroups.com> <de0e8bc0-b615-409b-aa97-733ea641497c@googlegroups.com> <f95b1582-18f3-4c62-b0fb-44a35f71f7f7@googlegroups.com> <2240fb7d-ff33-4281-b837-a2b119198179@googlegroups.com>
Date 2016-04-03 10:40 -0400
Message-ID <87zitaycui.fsf@hemphills.net> (permalink)

Show all headers | View raw


jdaw1 <jdawiseman@gmail.com> 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

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-11-20 23:23 -0800
  Re: How does 'arc' work? bugbear <bugbear@trim_papermule.co.uk_trim> - 2013-11-21 14:05 +0000
    Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-12-01 04:03 -0800
  Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2013-11-23 15:06 -0800
    Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-12-01 03:48 -0800
      Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-12-01 03:58 -0800
        Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-12-10 23:02 -0800
          Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-12-11 00:17 -0800
            Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-12-11 00:20 -0800
              Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2013-12-11 01:37 -0800
              Re: How does 'arc' work? tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2014-02-28 03:47 -0500
                Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2014-03-01 00:30 -0800
          Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2014-04-29 13:10 -0700
    Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2019-02-02 16:19 -0800
  Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2014-05-02 06:29 -0700
    Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2014-05-08 02:21 -0700
      Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2016-04-01 15:28 -0700
        Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-02 21:35 -0700
          Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2016-04-03 13:54 -0700
            Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-18 21:40 -0700
              Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-19 15:04 -0700
                Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2016-04-20 02:06 -0700
                Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2016-04-20 05:18 -0700
                Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-22 00:40 -0700
                Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-22 11:32 -0700
                Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-23 20:49 -0700
                Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-23 22:46 -0700
                Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2016-04-24 04:01 -0700
                Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-30 21:47 -0700
                Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-05-01 02:59 -0700
        Re: How does 'arc' work? Scott Hemphill <hemphill@hemphills.net> - 2016-04-03 10:40 -0400
          Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-05 21:48 -0700
            Re: How does 'arc' work? Scott Hemphill <hemphill@hemphills.net> - 2016-04-06 10:37 -0400
            Re: How does 'arc' work? luser- -droog <mijoryx@yahoo.com> - 2016-04-07 23:59 -0700
            Re: How does 'arc' work? jdaw1 <jdawiseman@gmail.com> - 2016-04-19 02:54 -0700

csiph-web