POV-Ray : Newsgroups : povray.general : Bezier spline approximations to circles : Re: Bezier spline approximations to circles Server Time
26 Apr 2024 12:35:09 EDT (-0400)
  Re: Bezier spline approximations to circles  
From: Cousin Ricky
Date: 20 Feb 2019 23:13:11
Message: <5c6e2557$1@news.povray.org>
On 2019-02-20 10:06 AM (-4), JimT wrote:
> Cousin Ricky <ric### [at] yahoocom> wrote:
>> On 2019-01-22 11:23 AM (-4), JimT wrote:
>>> If you want a Bezier Spline approximation to an arc of a circle subtending angle
>>> theta at the centre, the four control points are
>>>
>>> (1,0), (1,a), (cos(theta) + asin(theta),sin(theta) -
>>> acos(theta)),(cos(theta),sin(theta))
>>>
>>> where a = (8/3)(sin(theta/2) - sin(theta)/2)/(1-cos(theta))
>>
>> Hmmm.  This is the formula for 'a' that I used for the ring shank cross
>> section in GemCuts:
>>
>>     #declare Gem__fn_Bezier_arc = function (x)
>>     { (8 * cos (x / 2) - 4 - 4 * cos (x)) / (3 * sin (x))
>>     }
>>
> Sorry I'm a month late. I didn't spot your post. And you probably won't spot
> this.
> 
> I plotted them in Matlab to convince myself they were the same. Then I
> multiplied top and bottom by sin(x/2)/cos(x/2). 1+cos(x) is 2cos^2(x/2) and
> 1-cos(x) is 2sin^2(x/2).

Good to know.  That's more trig than I can remember.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.