rotating double helix · depth-shaded 2D projection

DNA Double Helix: Rotating Base-Pair Ladder (2D)

The 3D version of this simulation builds a real WebGL double helix by walking a parametric curve — two strands offset 180° around a shared axis, connected by base-pair rungs, twisting as they rise. This 2D companion runs the exact same parametric equations, but instead of handing them to a 3D renderer it projects them onto a flat canvas itself: the depth coordinate that would normally come from a camera is used directly to brighten, widen and layer the near strand over the far one, so the same twist, backbone-radius and rotation-speed controls still produce a helix that visibly rotates in depth — on nothing but Canvas2D.