8 Queens Problem
Abhivadaye
Anagram Finder
Bouncing Spheres
Break Out
Classic Snake
Cycloids
Deflection Demo
Double Pendulum
EV Savings
Flocking
Fog fly through
Forces on Objects
Fractals
Game of Life
Horizontal Stars
Image Scanning
JSON Beautify
Julia Sets
Kaleidoscope
Kock Fractals
Lorenz Attractor
Mandlebrot Set
Meta Balls
Natural Flocking
Number Convert
Number Game
Pandemic Simulator
Particles & Nodes
Perlin Noise
Poisson Disk
QuadTree Search
Ripples
Set Demonstration
Sierpiński Triangles
Simple Pendulum
Sine Waves
Starfield
Super Shapes 2D
Target Finder
Tic Tac Toe
Voronoi Diagram
Who Moved My...
Sine Waves
03 Aug 2003

If one ever wants to work with graphics, then familiarity with the trignometry functions, Understanding the Sine (sin) and Cosine (cos) are necessary. A sine wave or sinusoid is a mathematical curve that describes a smooth periodic oscillation.

Sine and Cosine waves have a lot of uses. One of them is the famous SOHCAHTOA mnemonic that allows one to calculate the sides of a right-angled triangle if an angle is known if the angle θ is known. Coversely, if you know the sides of a right angled triangle, it is possible to calculate the sine and cosine θ values. The below canvas is used to demonstrate this.
Sorry, your browser does not support Canvas.
If you are thinking, "the hypotenuse is the nothing but the radius of the circle..." you are absolutely right. And this is by far the most use of the sine and cosine functions in graphics. If you know the radius and an angle, it is possible to plot the point on a circle using sine and cosine. Essentially it helps us convert values from a polar co-ordinate system to cartesian co-ordinates. I have this implemented in several places. Here are some experiments you can see this implemented. Deflection Demo, Double Pendulum, Lorenz Attractor, Simple Pendulum, and Supershapes 2D. Below is another canvas showing the relationship between Sine and Cosine. As you can see, these two functions are 90° apart from each other.

Sorry, your browser does not support Canvas.

And finally, to drive he point further of sine and co-sine functions, here's a neat Lissajous curve table. You can read more about this here. The source codes of all of these canvas animations are available below and are properly commented. Do feel free to reach out to me if you have any questions.