Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- #myrandomnumber Tutorial
- blprnt@blprnt.com
- April, 2010
- */
- //This is the Google spreadsheet manager and the id of the spreadsheet that we want to populate, along with our Google username & password
- SimpleSpreadsheetManager sm;
- String sUrl = "t6mq_WLV5c5uj6mUNSryBIA";
- String googleUser = "YOUR_USERNAME";
- String googlePass = "YOUR_PASSWORD";
- void setup() {
- //This code happens once, right when our sketch is launched
- size(800,800);
- background(255);
- smooth();
- //Ask for the list of numbers
- int[] numbers = getNumbers();
- noStroke();
- for (int i = 0; i < numbers.length; i++) {
- println("numbers["+i+"]:"+numbers[i]);
- //fill(#96948f);
- int r, g,b;
- b = numbers[i] % 256;
- g = (numbers[i] >> 8) % 256;
- r = (numbers[i] >> 16) % 256;
- fill(r,g,b);
- ellipse(((i % 100) * 8)+4, i / 100 + (i / 100 * 8)+4, 8,8);
- };
- };
- void draw() {
- //This code happens once every frame.
- };
Add Comment
Please, Sign In to add comment