On 22-3-2012 10:17, Jasper van de Gronde wrote:
On 21-03-12 23:52, Johan Engelen wrote:
Hi all, After busting my brain for two evenings, I've succeeded in creating properly rounded joins for powerstroked paths... The quick explanation:
- for constant stroke width paths: looks like SVG rounded joins
(circular arc)
- for non-constant width paths, it is not possible to round with a
circle and keep the curve smooth (tangents will not match). So the rounding is done with an elliptical arc, for which the tangents *do* match. There are many possible ellipses, and I decided for the one with minimum eccentricity. This converges to a circle for constant stroke width.
Another interesting option could be a spiro curve, as it has constant change in curvature and will probably also converge to a circle.
Good idea! Would it be OK to pin down the start and end tangent of the spiro curve by simply duplicating the start and end node and moving them slightly in the direction along the tangent?
Ciao, Johan