# Warp-like pattern in a closed curve

Given a closed curve in 2D space that intersects itself (transversally, and there's no point in which three paths or more meet), is it possible to look at it as a Celtic knot so when you follow it, one time you're above the other path in an intersection point, and one time you're under it?

My gut feeling tells me it is possible, but I could not proof it. Any idea?

For example this closed curve has been drawn so the crossings alternate over-under-over-under:

-
Is that what you mean? – Jack Schmidt Aug 15 '12 at 19:48
Yes, thank you for the illustration and sorry for being unclear. – Bob Aug 15 '12 at 20:03
awesome question then. – Jack Schmidt Aug 15 '12 at 20:09
@AndrewStacey made me a latex package to do this automatically, and at the time I wondered how well it worked mathematically (in latex, the "simple intersection" condition has to be even stricter; they must cross at maybe 45 to 90 degrees, and two crossing have to be kind of far away). However, if you have more than one curve, you can mess things up, and then it was time to hand out the final. :-) – Jack Schmidt Aug 15 '12 at 20:10

A (reasonably well-behaved) self-intersecting closed curve divides the plane into a number of components that can be coloured alternately black and white in a checkerboard manner. Declare a segment of the curve to go over or under a crossing depending on whether black is to the left or the right of the segment as it approaches the crossing. This produces a knot that is alternating by construction.

-
How do you know you don't need a third color? – Jack Schmidt Aug 15 '12 at 20:15
Ok, I see a proof. Nice image! – Jack Schmidt Aug 15 '12 at 20:17
@Jack, the colour at a point is determined by the parity of the winding number of the curve around that point. Edit: And thanks! – Rahul Aug 15 '12 at 20:18
Very nice proof, thank you! – Bob Aug 15 '12 at 21:27

$$(x(t),y(t)),\ \ 0<t<1$$
Extend it with $z(t)$
$$(x(t),y(t),z(t)),\ \ 0<t<1$$
in such a way that if ever $x(t_1)=x(t_2)$ and $y(t_1)=y(t_2)$, then $z(t_1)\neq z(t_2)$. One simple way to do this is to have your point $t=0$ not be on an intersection. Then just have your $z(t)$ be monotonically increasing for $t$ until you get past the last 2D-intersection point, at which point you can safely go back down to the bottom knowing that you won't cross yourself.