Even-odd rule

Even-odd rule

The even-odd-rule is an algorithm implemented in vector-based graphic software, like the PostScript language, which determines how a graphical shape with more than one closed outline will be filled. Opposite: nonzero-rule.

The SVG specification says: "This rule determines the "insideness" of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside; if even, the point is outside."

The rule can be seen in effect in many vector graphic programs (like Freehand or Illustrator), where a crossing of an outline with itself causes shapes to fill in strange ways.

On a simple curve, the even-odd rule reduces to a decision algorithm for the point in polygon problem.

External links

* [http://www.w3.org/TR/SVG/painting.html#FillProperties Definition of fill rules in SVG]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Even — GeneralEven may refer to: * Even, a Scandinavian male personal name (coincidentally, Odd is also a common Norwegian name). * Even (people), an ethnic group from Siberia and Russian Far East **Even language, a language spoken by the Evens * Even… …   Wikipedia

  • Nonzero-rule — A curve (top) is filled according to two rules: the even odd rule (left), and the non zero winding rule (right). In each case an arrow shows a ray from a point P heading out of the curve. In the even odd case, the ray is intersected by two lines …   Wikipedia

  • Rule 184 — is a one dimensional binary cellular automaton rule, notable for solving the majority problem as well as for its ability to simultaneously describe several, seemingly quite different, particle systems:* Rule 184 can be used as a simple model for… …   Wikipedia

  • Divisibility rule — A divisibility rule is a shorthand way of discovering whether a given number is divisible by a fixed divisor without performing the division, usually by examining its digits. Although there are divisibility tests for numbers in any radix, and… …   Wikipedia

  • Nitrogen rule — The nitrogen rule states that organic compounds containing exclusively hydrogen, carbon, nitrogen, oxygen, silicon, phosphorus, sulfur, and the halogens either have 1) an odd nominal mass that indicates an odd number of nitrogen atoms are present …   Wikipedia

  • Doomsday rule — John Conway, inventor of the Doomsday algorithm The Doomsday rule or Doomsday algorithm is a way of calculating the day of the week of a given date. It provides a perpetual calendar since the Gregorian calendar moves in cycles of 400 years. This… …   Wikipedia

  • Singly and doubly even — In mathematics an even integer, that is, a number that is divisible by 2, is called evenly even or doubly even if it is a multiple of 4, and oddly even or singly even if it is not. (The former names are traditional ones, derived from the ancient… …   Wikipedia

  • Oddo-Harkins rule — See also: Isotope#Even and odd The Oddo Harkins rule holds that elements with an even atomic number (such as carbon) are more common than elements with an odd atomic number (such as nitrogen). Contents 1 Definition 2 Exceptions to the rule …   Wikipedia

  • Majority rule — Majority Rules redirects here. For Canadian comedy show, see Majority Rules!. Part of the Politics series Electoral methods …   Wikipedia

  • Independent Order of Odd Fellows — This article is about the North American organization and its international off shoots. For other world wide Orders, see Odd Fellows. For the Australian financial services company, see IOOF (company). For other uses, see IOOF (disambiguation).… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”