Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Usually, if an implicit equation $F(x, y) = 0$ defines a curve (or curves) on the x-y plane, then we can use the inequalities $F(x, y) < 0$ or $F(x, y) > 0$ to color the regions bounded by the curve (or curves). In this way, we can make interesting pictures.

Suppose $(x, y) = (f(t), g(t))$ defines a parametric curve (an example picture) on the plane. How to color the regions (an example picture) bounded by the curve without converting the parametric equation to an implicit equation?

share|cite|improve this question

Given a closed curve $\gamma: t\mapsto{\bf z}(t)$ $\ (0\leq t\leq T)$ in the plane under mild technical conditions for each point $c=(a,b)\notin\{{\bf z}(t)\ |\ t\in [0,T]\}$ the winding number $n_\gamma(c)$ is defined by $$n_\gamma(c):={1\over 2\pi}\int_0^T {(y(t)-b)\dot x(t)-(x(t)-a)\dot y(t)\over (x(t)-a)^2+(y(t)-b)^2}\ dt ={1\over 2\pi i}\int_\gamma{dz\over z-c}\ .$$ This number is always an integer (this is a miracle). Color the point $c$ green if $n_\gamma(c)$ is odd and white otherwise.

share|cite|improve this answer
Thank you for your helpful answer. – benice Apr 5 '12 at 22:25

You can use the winding number to discriminate among the regions. If we use complex numbers to represent the plane, the winding number of the closed parametric curve $z = \gamma(t)$, $0 \le t \le 1$, around a point $a$ not on the curve is $$n(\gamma;a) = \frac{1}{2\pi i} \oint_\gamma \frac{dz}{z-a} = \frac{1}{2\pi i} \int_0^1 \frac{\gamma'(t)\ dt}{\gamma(t)-a}$$ which should take integer values (so you can use numerical methods to calculate this approximately and round to the nearest integer).

share|cite|improve this answer
Thank you for your helpful reply. – benice Apr 5 '12 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.