Re: stroke-linejoin="arcs"

Dear Tav,

I assumed the right-hand convention for the normals. Take the tangent
direction at a point P(t) while moving along the segment. Call it T(t).
Rotate it CCW by 90 degrees and normalize to produce N(t). Now compute
signed curvature κ(t) as usual. The center of the osculating circle is at
P(t) + N(t)/k(t). As long as the tangent direction and curvature have been
computed consistently (i.e., traversing the curve in consistent
directions), the formula should work, no? Where is the ambiguity? The
formulas do not change regardless of whether the join is to the right or
left of the path.

I think we have a few cases here, depending on signed curvatures of the two
connecting segments. In order of precedence:

1) If either curvature is -∞, we revert to the round join.

2) If both curvatures are in (-∞​, 0], then the offset osculating "circles"
intersect and we are golden. Quotes are because these circles could
degenerate to lines, but this is no trouble.

3) If one curvature is in (-∞​, 0] and the other is in (0, 2/w), where w is
the stroke width, the offset osculating circles may or may not intersect.
This case is problematic because, according to the proposal, we don't have
a continuous behavior here. Reverting back to miter when no intersection is
found will basically create a pop. Perhaps we should instead take the
positive curvature and reduce it until the circles are tangent? At least
this would create a continuous behavior more in the line of what SVG does
in other cases...

4) If either curvature is in [2/w, +∞​], the offset osculating circles may
or may not intersect. However, the intersection is *not* meaningful,
because the offset osculating circle does not correspond to the offset
stroke. It is as though you are offsetting a circle by more than its
radius. Only the outer boundary matters. The inner boundary simply
disappears. It doesn't make sense to intersect inner boundaries because
they are not part of the offset path at all.

For some reason, I can't load the SVG files you linked to. (Subscripts in a
link?)

As for your blog, can I get the SVG files for these cool examples you show?

Kind regards,
Diego
​

Received on Tuesday, 1 December 2015 16:08:39 UTC