W3C home > Mailing lists > Public > www-svg@w3.org > August 2004

Markers and angle bisectors

From: David Turner <novalis@novalis.org>
Date: Fri, 06 Aug 2004 15:33:19 -0400
To: www-svg@w3.org
Cc: inkscape-devel@lists.sourceforge.net
Message-Id: <1091820798.23804.11917.camel@banks>
I'm still improving Inkscape's marker support, and have discovered
another deficiency in the spec:

11.6.2
"the marker's positive x-axis should point toward the angle bisector for
the angle at the given vertex,"

Consider the attached SVG.  The black line represents a path  Its end
point is at the bottom left of the drawing.  Confusingly, all of the
markers in Inkscape are designed to point from the end of the line
towards its start, a convention I've followed here. The red lines
represent the inner angle bisectors.  The blue lines represent markers
with positive x-axis pointing towards the angle bisector.

You will notice that the two arrows point in opposite directions.  This
is clearly undesirable.  The correct action would be to use the inner
angle bisector for the leftmost marker, and the outer for the rightmost
marker.  

A rule which accomplishes this is: If the clockwise angle from the
incoming vector to the outgoing vector is greater than 180%, use the
outer angle bisector, else use the inner angle bisector.  Incoming
vectors are those which are closer to the start of the path.

This is the rule I intend to implement in Inkscape.

-- 
-David "Novalis" Turner                     Stalk Me: 617 441 0668
                       "PLAN WHILE YOU CAN, LITTLE THING OF EARTH.
WE ARE NOT YET CAST DOWN."  - Mary Gentle, _Ash: A Secret History_




angle-bisector.svg
(image/svg attachment: angle-bisector.svg)

Received on Friday, 6 August 2004 15:19:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:53 UTC