|
|
Adding Sine to Cosine varying the phase. |
Wave 1: Sine Wave (solid blue): y = sin(x + phase)
Wave 2: Cosine Wave (dashed red): y = cos(x)
Sum = Wave 1 + Wave 2 (thick black) = sin(x + phase) + cos(x)
Adjust the phase of the sin graph using the slider.
The circle in the bottom right represents the phase on a unit circle.
This applet was developed by Steven Sahyun. The initial graph was created in MATLAB and the code was converted and extended to HTML5/JavaScript with assistance from OpenAI’s ChatGPT (Jan. 30, 2026).