SINTEF-Geometry / SISL

The SINTEF Spline Library
GNU Affero General Public License v3.0
182 stars 61 forks source link

how to create a arc with a start point and and end point with radius of R. #43

Open ztdepztdep opened 1 year ago

ChenxingWang93 commented 8 months ago

hei

Let's assume the starting point is P{0}, the ending point is P{2}

if we still consider using 'rational Bezier' way to express an arc. One quadrant of the unit circle

C(u) = (x(u),y(u)) = (\frac{1-u^{2}}{1+u^{2}},\frac{2u}{1+u^{2}}) 0<=u<=1

Imagine! Please use your imagination. In your head P{0} = (1, 0), P{1} = (1, 1), P_{2} = (0, 1) For the weights we have

W(u) = 1 + u^{2} = \sum_{i=0}^{2}B_{i,2}(u)w_{i} = (1-u)^{2}w_{0}+2u(1-u)w_{1}+u^{2}w_{2}

So the Bezier representation (w{0} = 1, w{1} = 1, w_{2} = 2)

:) not sure if helpful.