Sine Wave Simulation

This arcade project simulates how SINE waves work.

Two sine waves — white and blue, both scrolling continuously with phase shift illusion.

Circle visualizer — rotating point on the left showing that sin is just the y component of rotation, with a line connecting it to where the wave starts.

Interference — where the two waves cross or get close, it flashes cyan showing constructive interference.

Slider — vertical yellow line at x=100 showing the current amplitude value of wave 1 at that point.

Controls:

  • A = increase wave 1 frequency

  • B = decrease wave 1 frequency

  • Up = increase amplitude

  • Down = decrease amplitude

  • Left = decrease wave 2 frequency

  • Right = increase wave 2 frequency

Smooth transitions — all changes lerp smoothly instead of jumping.

Negative frequencies — both waves can go negative making them scroll backwards.

4 Likes