筆順 · mirror line and stroke order
Mirror symmetry and order
Among jōyō drawings that match their own left-right mirror, which stroke-order strategy the file uses.
These are frequencies in one KanjiVG snapshot. The page records the order those files use.
On this page
How the test is read
The mirror line is x = 54.5, the centre of the KanjiVG square of side 109. A point (x, y) goes to (109 − x, y). In the SVG, y grows downward.
Each stroke is eight points, equally spaced along the curve, including both ends. A cubic is flattened to six steps so the spacing follows the curve. The distance between two strokes is the symmetric Hausdorff distance of those points: take each point of one stroke to the nearest point of the other, keep the farthest of those, and do the same in the other direction. The distance is the greater of the two results.
A stroke is matched to one partner, which may be itself. The defect is the smallest D such that some matching keeps every pair at distance at most D. D is rounded half up to a hundredth of a unit. The character passes tolerance T when that hundredth-count is at most 100T. The tolerances are 6, 9, and 12. The primary tolerance is 9.
On that matching, a stroke matched to itself is on the axis when every sample lies within T of the mirror line. Otherwise it is a bar. In a pair, the left wing is the stroke with the smaller mean x, and the other is the right wing. The strategy is the first test below that succeeds: frame, centre, left wing, top-down bars, other. The same matching is read at each tolerance. Only the on-axis test uses T.
Nine characters
Nine characters were checked against the test. The table is what the files give. A dash means the character fails that tolerance. A strategy name means it passes, under the test named in the later sections.
| Character | Strokes | Defect | At 6 | At 9 | At 12 |
|---|
Three tolerances
Each strategy cell is a count of characters. A character is counted once, under the first test that succeeds. The order of the tests is frame, centre, left wing, top-down bars, other.
| Tolerance | Characters | Frame | Centre | Left then right | Bars | Other |
|---|
Centre stroke before the wings
There is at least one on-axis stroke, and every on-axis stroke number is smaller than every wing number. When there is no wing, the smallest on-axis stroke number is 1. A bar may come before the on-axis stroke.
Click a plate to replay. With reduced motion the finished character stays still. The caption names each colored group. Where the plate has an on-axis stroke, the first group is that stroke.
- First group
- Second group
- Third group
- Fourth group
KanjiVG · CC BY-SA 3.0
Left wing before right wing
This strategy is used when the frame test and the centre test have not succeeded. There is at least one wing pair, and in every pair the left stroke number is smaller than the right stroke number.
KanjiVG · CC BY-SA 3.0
Top-down horizontal bars
This strategy is used when the three tests above have not succeeded. There is no wing pair. There are at least two strokes. Every stroke is a bar wider than it is tall. Sorting by mean y, and by stroke number when the means tie, puts the stroke numbers in increasing order. A smaller y is higher on the page.
KanjiVG · CC BY-SA 3.0
Frame first
A left post reaches within 4 units of the character’s leftmost sample, is at least half the character’s height, is taller than it is wide, and has its mean x to the left of 54.5. A right post is the same condition on the right. An interior stroke has every sample more than 10 units inside the bounding box on all four sides. The character is a frame when a left post, a right post, and an interior stroke are present, and every post number is smaller than every interior number.
| Character | Strokes | Defect |
|---|
Other
The character passed the tolerance, and none of the four tests above succeeded.
KanjiVG · CC BY-SA 3.0
The primary list
| Character | Strokes | Defect | Strategy | On axis | Wing pairs | Bars |
|---|
Borderline characters
| Character | Strokes | Defect | Strategy at 12 |
|---|
What this shows
70a0b7ae0c18ceb5cb358274b029cce0234a43bc of github.com/KanjiVG/kanjivg. The plate files are unmodified copies in site/assets/kanjivg/. Jōyō index: the list used on the Gallery.