ianhi_processing/NatureOfCode/The-Nature-of-Code-Examples-master/Processing/chp3_oscillation/Exercise_3_10_OOPWave/Exercise_3_10_OOPWave.pde
// The Nature of Code
// Daniel Shiffman
// http://natureofcode.com

// Sine Wave

// Two wave objects
Wave wave0;
Wave wave1;

void setup() {
  size(750,200);
  // Initialize a wave with starting point, width, amplitude, and period
  wave0 = new Wave(new PVector(50,75),100,20,500);
  wave1 = new Wave(new PVector(300,100),300,40,220);

}

void draw() {
  background(255);
  
  // Update and display waves
  wave0.calculate();
  wave0.display();
  
  wave1.calculate();
  wave1.display();


}


