Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rounding corners of a straight-edge path
#5
(05-27-2021, 05:24 PM)Ofnuts Wrote:
Quote:The algorithm to draw circular arcs is based on the well-known idea.

Is that the one that uses kappa=(4/3)*(sqrt(2)-1) (from memory)? The shallowness of the proof of that one has always intrigued me. But it does work with all angles...

Yes that is the one. I took that very formula and with some trigonometric manipulation changed it to suit my current purpose. Namely, I was drawing circular arcs without knowing the centers. But I had tangent triangles available. The code became pleasantly simple. You can find it in the plugin. Search for "def circlular_arc_in_tangent_triangle" (yes I notice now that there is a typo!). Note that I use the plane as the complex number plane. So, instead of [x,y] all points are complex numbers x+iy.

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.
Reply


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

Forum Jump: