Drawing a mobius strip in OpenGL
geometry, opengl
Solution
The solution is simple: Don't go from just 0 to 2π, but to 4π, i.e. you pass two times over the strip. Enable back face culling.
This is kind of the standard experiment on real world Möbius strips, drawing a line along the middle until you hit the beginning of the line. You have to go around the strip two times. It's exactly this, what you do with OpenGL then.
Problem
I'm trying to draw a Mobius strip using parametric equation such that it is always 'lit' (i.e. all of the normal vectors point towards the camera). The main problem that I have is that the mobius strip is not orientable, so however I orient the strip, some normal vectors are going to point away from the camera. Is there a smart way to determine when to "flip" the normal vector such that it always points towards the camera? I've tried drawing the mobius strip twice such that normals are in both direction, but I then I get black and white strips from z-fighting.