5 views

1 Answers

In two-dimensional computer graphics, the non-zero winding rule is a means of determining whether a given point falls within an enclosed curve. Unlike the similar even-odd rule, it relies on knowing the direction of stroke for each part of the curve.

For a given curve C and a given point P: construct a ray heading out from P in any direction towards infinity. Find all the intersections of C with this ray. Score up the winding number as follows: for every clockwise intersection subtract 1; for every counter-clockwise intersection add 1. If the total winding number is zero, P is outside C; otherwise, it is inside.

The winding number is effectively a count of how many full counter-clockwise revolutions the curve makes around P without doubling back on itself.

Some implementations instead score up the number of clockwise revolutions, so that clockwise crossings are awarded +1, counter-clockwise crossings -1. The result is the same.

5 views

Related Questions

What is Rule of marteloio?
1 Answers 4 Views
What is Rule of sum?
1 Answers 5 Views
What is Shift rule?
1 Answers 4 Views
What is Reciprocal rule?
1 Answers 5 Views
What is Varian Rule?
1 Answers 5 Views
What is No-impeachment rule?
1 Answers 5 Views
What is McCallum rule?
1 Answers 6 Views
What is Waiter Rule?
1 Answers 5 Views
What is RULE Project?
1 Answers 5 Views