A simulation that models simple harmonic motion in 2 dimensions
Here, you can control:
- the maximum path points that your shm trajectory can have
- the linear interpolation factor - higher values are less smooth than lower values, but
they follow the path of the shm more accurately while being less susceptible to framerate changes
- the radius of the circle and the line size of the path
- the time step - higher values make the simulation run faster, but you don't see every
frame, only what's calculated <timestep> frames from the last shown frame
- the frequency - you can change the X and Y frequencies to achieve different effects
- the box sizes - you can change the X and Y box sizes to change the aspect ratio and size
of the resulting animation
- the phase difference - this is the phase applied to the sin function such that it leads
the cos function by <phase°>
- the phase speed - this is the amount in degrees that the phase is increased by each frame
- the visibility of the circle and the path
Note that the simulation may seem like it vibrates at high time-steps and relatively stable x and
y frequencies. This happens due to lack of smoothing of the path lines drawn by the circle. A lower
frequency combination will have a more smooth path than a higher frequency combination: Ex. 2:3 will
have a more smooth path than 32:48