Global

Members

dt

A gloabl vairable which stores the time step per frame
Source:

frequencyChanged

A global variable that checks if the frequency of the wave has been changed by the user
Source:

kx

A gloabl vairable that changes the frequency of the lissajous pattern in the x direction
Source:

ky

A gloabl vairable that changes the frequency of the lissajous pattern in the y direction
Source:

phaseX

A gloabl vairable that stores the relative phaxe of the x component of the wave with respect to zero
Source:

phaseY

A gloabl vairable that stores the relative phaxe of the y component of the wave with respect to zero
Source:

posArray

A gloabl vairable that stores all the previous positions of the "electron"
Source:

posArrayLen

A gloabl vairable that dictates how many previous values of the electrons position shall be saved.
Source:

time

A gloabl vairable that scales the amount of time that has passed so that it is more suitable for the lissajous pattern to be visible
Source:

Methods

draw()

A p5.js function that renders the changes to the canvas.
Source:

mouseClicked()

A p5.js function that passes mouse click information to the progeram. In this case it is being used to adjust the x and y frequency of the wave if the mouse is over the sliders.
Source:

setup()

A p5.js function the is used to setup the canvas
Source:

xslider()

Draws the x frequency slider on the bottom of the canvas
Source:

yslider()

Draws the y frequency slider on the side of the canvas
Source:

Documentation generated by JSDoc 3.6.3 on Sun Jun 05 2022 20:22:57 GMT+0100 (BST)