/* 6.914, Example 0.11 By creating values in the global environment and changing their values in draw(), we can create animated shapes that move and change based on a changing variable. Use frameRate to change how many times per second draw() executes. By incrementing a variable by different numbers, we can alter a variable's rate of change. */ int startXvar = 50; void setup(){ size(200, 200); frameRate(5); // this means that draw() will run 5x/second. } void draw(){ background(50); // use background to "clear the screen" each time draw() runs. rect(startXvar, 100, 30, 30); startXvar++; // This line will increment by 10 instead of 1. Try using it instead of the previous line. // startXvar += 10; }