How can I create a line that loops behind itself? Similar to a knot?

I’m struggling trying to figure out how to make a line loop back and go either above or behind itself.

In the attached example I would like the red line to go above (over top) the green line at the one intersection and below (under) at the other.

Is that possible?

One way is to first draw the shape in 2 dimensions and then select an endpoint of one of your lines and use the move/rotate tool.