/* * Creative Coding * Week 2, 05 - Moving Patterns 1 * by Indae Hwang and Jon McCormack * Copyright (c) 2014 Monash University * * version edited by Toby Berriman * * This sketch builds on the previous sketches, drawing shapes based on the * current framerate. The movement of individual shapes combine to create a * gestalt field of motion. Use the arrow keys on your keyboard to change the * frame rate. * */ // variable used to store the current frame rate value int frame_rate_value; void setup() { size(500, 500); frame_rate_value = 6; frameRate(frame_rate_value); rectMode(CENTER); background(0); colorMode(HSB, 100); } void draw() { background(0); int num = 20; int margin = 0; float cellsize = ( width - (2 * margin) * (num - 1) ) / (num - 1); int col = 5; int circleNumber = 0; // counter for (int i=0; i 1) { frame_rate_value--; // set the frameRate and print current value on the screen frameRate(frame_rate_value); println("Current frame Rate is: " + frame_rate_value); } if ( key == 's') { saveFrame("curvyThing-###.jpg"); println("Screenshot saved."); } }