File tree Expand file tree Collapse file tree
content/examples/Basics/Math/SineWave Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88int xspacing = 8 ; // How far apart should each horizontal location be spaced
99int w; // Width of entire wave
1010
11- float theta = 0.0 ; // Start angle at 0
11+ float theta = 0.0 ; // Start angle at 0
1212float amplitude = 75.0 ; // Height of wave
13- float period = 500.0 ; // How many pixels before the wave repeats
14- float dx; // Value for incrementing X, to be calculated as a function of period and xspacing
15- float [] yvalues; // Using an array to store height values for the wave (not entirely necessary)
13+ float period = 500.0 ; // How many pixels before the wave repeats
14+ float dx; // Value for incrementing X, a function of period and xspacing
15+ float [] yvalues; // Using an array to store height values for the wave
1616
1717void setup () {
1818 size (200 ,200 );
You can’t perform that action at this time.
0 commit comments