encyclopegia.org

Nonzero-rule

(left), and the non-zero winding rule (right).[src] In each case an arrow shows a ray from a point P heading out of the curve.[src] In the even-odd case, the ray is intersected by two lines, an even number; therefore P is concluded to be 'outside' the curve.[src] By the non-zero winding rule, the ray is intersected in a clockwise direction twice, each contributing −1 to the winding score: because the total, −2, is not zero, P is concluded to be 'inside' the curve.[src] In two-dimensional computer graphics, the non-zero winding rule is a means of determining whether a given point falls within an enclosed curve.[src] Unlike the similar even-odd rule, it relies on knowing the direction of stroke for each part of the curve.[src] For a given curve C and a given point P: construct a ray (a straight line) heading out from P in any direction towards infinity.[src] Find all the intersections of C with this ray.[src] Score up the winding number as follows: for every clockwise intersection (the curve passing through the ray from left to right, as viewed from P) subtract 1; for every counter-clockwise intersection (curve passing from right to left, as viewed from P) add 1.[src] If the total winding number is zero, P is outside C; otherwise, it is inside.[src] The winding number is effectively a count of how many full counter-clockwise revolutions ('windings') the curve makes around P without doubling back on itself.…[src]

(left), and the non-zero winding rule (right).[src] In each case an arrow shows a ray from a point P heading out of the curve.[src] In the even-odd case, the ray is intersected by two lines, an even number; therefore P is concluded to be 'outside' the curve.[src] By the non-zero winding rule, the ray is intersected in a clockwise direction twice, each contributing −1 to the winding score: because the total, −2, is not zero, P is concluded to be 'inside' the curve.]] In two-dimensional computer graphics, the non-zero winding rule is a means of determining whether a given point falls within an enclosed curve.[src] Unlike the similar even-odd rule, it relies on knowing the direction of stroke for each part of the curve.[src] For a given curve C and a given point P: construct a ray (a straight line) heading out from P in any direction towards infinity.[src] Find all the intersections of C with this ray.[src] Score up the winding number as follows: for every clockwise intersection (the curve passing through the ray from left to right, as viewed from P) subtract 1; for every counter-clockwise intersection (curve passing from right to left, as viewed from P) add 1.[src] If the total winding number is zero, P is outside C; otherwise, it is inside.[src] The winding number is effectively a count of how many full counter-clockwise revolutions ('windings') the curve makes around P without doubling back on itself.[src] (If P were a nail and C were a looped piece of string, try pulling some part of the string sideways away from the nail: it will either come free, or it will be found to be wound some number of times around the nail.) Some implementations instead score up the number of clockwise revolutions, so that clockwise crossings are awarded +1, counter-clockwise crossings −1.[src] The result is the same.[src] One formal definition of the winding number of point P with respect to curve C (where P does not lie on the curve) is as follows: The SVG computer graphics vector standard uses the non-zero rule by default when drawing polygons.[src] ==See also== Even-odd rule Complex polygon Tessellation Polygon triangulation TrueType ==References== ==External links== Definition of fill rules in SVG Song Ho's explanation of the OpenGL GLU tesselator[src]

25 sentences · 25 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Nonzero-rule." encyclopegia.org, 2025, https://encyclopegia.org/wiki/nonzero-rule. Accessed 26 November 2026.

Chicago

"Nonzero-rule." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/nonzero-rule.

APA

encyclopegia.org. (2025). Nonzero-rule. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/nonzero-rule

Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

chain rule

stub · references available

away goals rule

stub · references available

Rule, Britannia!

stub · references available

ecogeographical rule

stub · references available

association rule learning

stub · references available

Taiwan under Qing dynasty rule

stub · references available

Hotelling's rule

stub · references available

house rule

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1303067120 · 0.5 · snapshot enwiki-001303067120

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.