I had to create a sine-cosine demonstrator for a class, this is that demo.
This was done using the canvas object in html 5 and some tickers to update it. It basically animates a wave in real time. Some terms are:
Amplitude - how big the wave is
Phase - how far the time value is shifted
Carrier - the default frequency the wave moves.
You can download the source at https://www.henryschmale.org/apps/sin-cos.html