Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rounding corners of a straight-edge path
#7
(05-28-2021, 03:32 PM)Ofnuts Wrote:
(05-27-2021, 05:37 PM)Ottia Tuota Wrote: ...


Edit: No, I said wrong. I did not take quite that formula but a more general one that works for circular arcs with central angle other than 90 degrees. The formula is: (4/3)*tan(theta/4) where theta is the central angle.

That's still the one I think; the value I mentioned is for theta=π/2. It is based on the assumption that the best Bezier approxmation is when the intersection of the Bezier curve and the bisector is on the true circle, but there are possibly better criteria, such as minimizing the area between the true circle and the curve. The main merit of that approximation is that it is easy to compute for all angles.

And for central angles <= 90 degrees the error in that formula will be smaller than line thickness in a drawing. That is good enough.

But it would be nice to have a formula that works reasonably well up to 180 degrees. The usual remedy is to split arcs so that a 180 degrees arc is drawn as two 90 degrees arcs. That means more control points.

In this plugin this formula is used for all circular arcs, without any splitting, even up to close 180 degrees. You see, in the particular situations where this plugin is applied, the circular arcs with such large central angles will be so small that nobody will notice anything... Cheating? No, I think it is just good enough. But perhaps I will have a better solution some day. I have a little idea now... we shall see.
Reply


Messages In This Thread
RE: Rounding corners of a straight-edge path - by Ottia Tuota - 05-29-2021, 06:37 AM

Forum Jump: