Overview:
- plotting sinusoids
- sinusoidal motion
- Lissajous curves
- controlling other properties
- lerp, map, constrain
- Perlin noise
Plotting Sinusoids:
- Math: y = a + b sin (cx + d)
- Code: y = a + b * sin (c * x + d);
Where:
- The stuff inside parentheses is in radians
- x = input to the function (often, a horizontal coordinate)
- y = output of the function (often, the vertical coordinate of the plotted function)
- a = offset (the vertical location of the wave)
- b = amplitude (the peak-to-peak height of the wave)
- c = frequency (how many cycles there are)
- d = phase offset (where the cycle starts)
Sinusoidal movement:
Coding Train video:
Lissajous Curves
Controlling Other Properties with Sinusoids
You can use a sinusoid to control position, size, color, rotation, etc. etc. etc.
Lerp, Map, Constrain
- lerp(): Reference; Coding Train video (10m)
- map(): Reference; Example; Coding Train video (10m).
- map() and constrain(): Golan video (10m)
Other Topics
- Perlin Noise