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


Groups > comp.lang.postscript > #2530

Re: How does 'arc' work?

Newsgroups comp.lang.postscript
Date 2016-04-18 21:40 -0700
References (1 earlier) <de0e8bc0-b615-409b-aa97-733ea641497c@googlegroups.com> <f95b1582-18f3-4c62-b0fb-44a35f71f7f7@googlegroups.com> <2240fb7d-ff33-4281-b837-a2b119198179@googlegroups.com> <0fc50e67-e520-40cd-b841-f458f58c9290@googlegroups.com> <c5b7ac2f-3af9-41f7-a0a4-00396e69944a@googlegroups.com>
Message-ID <c16e0fb9-1e4e-4eef-93be-344ee3f29c9d@googlegroups.com> (permalink)
Subject Re: How does 'arc' work?
From luser- -droog <mijoryx@yahoo.com>

Show all headers | View raw


On Sunday, April 3, 2016 at 3:54:55 PM UTC-5, jdaw1 wrote:
> On Sunday, 3 April 2016 05:35:24 UTC+1, luser- -droog  wrote:
> 
> > Aside from the cos/sin bungle, what do you need that these formulas
> > don't get you?
> > 
> > x0 = cos(a) 
> > y0 = sin(a) 
> > x1 = (4 - cos(a)) / 3 
> > y1 = ((1 - cos(a))(cos(a) - 3)) / (3*sin(a)) 
> > x2 = x1 
> > y2 = -y1 
> > x3 = x0 
> > y3 = -y0
> 
> Are they correct? I am expecting, with an angle of π/2 = 90°, that Sqrt[(x0-x1)^2+(y0-y1)^2] should be about 0.552. I think your formula returns 2×Sqrt[13]/3 ≈ 2.4037. Even with a = π/4 = 45°, it returns a distance of 1.09565.
> 
> Or have I made an error?

I'm not sure! Referring to this file of yours:
http://www.jdawiseman.com/2014/Bezier_part_circle_20140508.pdf
I'm not sure I understand it. Does the "Knots" stuff accurately
model the Bezier interpolation?

Empirically, my code seems to draw things that look like circular 
arcs to me. 

And my math-guru spent a few days with the equations and
came up with the same results. The derivation only worries 
about the middle point of the curve, where the naïve recursive
deCasteljau subdivision will later chop the curve in twain and
select the point as the join. We then just assume by symmetry
that further subdivision points will be on the same arc.

I also don't see in your notes any easy formula that I can grab
and apply to the problem of calculating the control points given
theta.

On the other hand, based on the outputs from Scott's program,
it appears my lengths are fairly consistent in being close
to double the "desired" measure. So it's probably worthwhile
to try scaling my tangent lengths and compare outputs. Maybe my
circles are not as pretty as they might be...

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