[cairo] Calculating Control Points For Bsplines

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Mon Dec 14 12:22:18 PST 2015


On Mon, 14 Dec 2015 10:37:52 +0100, Bernhard Fischer wrote:

> On Saturday 12 December 2015 22:46:17 Lawrence D'Oliveiro wrote:
>
>>     ((angle2 - angle1 + π) mod 2π - π) ÷ 2  
> 
> That's why I do not divide the angles like this (I did that in an
> earlier variant). I calculate the end points of an intermediate line
> and then determine the angle of this. It eliminates the need for
> handling of special cases.

That formula seems to work fine all around my example curve. No need
for special cases.


More information about the cairo mailing list