Sine wave · 40-segment circular buffer

One new sine-wave segment per step. Each segment replaces slot counter % 40. The trace travels from left to right, then starts again at the left edge.

Dark slots contain 9999.99. Gold slots contain segment coordinates. The outlined slot is the next to be overwritten.