Guest User

Untitled

a guest
Jun 25th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. /*
  2.  
  3. #myrandomnumber Tutorial
  4. blprnt@blprnt.com
  5. April, 2010
  6.  
  7. */
  8.  
  9. //This is the Google spreadsheet manager and the id of the spreadsheet that we want to populate, along with our Google username & password
  10. SimpleSpreadsheetManager sm;
  11. String sUrl = "t6mq_WLV5c5uj6mUNSryBIA";
  12. String googleUser = "YOUR_USERNAME";
  13. String googlePass = "YOUR_PASSWORD";
  14.  
  15. void setup() {
  16. //This code happens once, right when our sketch is launched
  17. size(800,800);
  18. background(255);
  19. smooth();
  20.  
  21. //Ask for the list of numbers
  22. int[] numbers = getNumbers();
  23. noStroke();
  24. for (int i = 0; i < numbers.length; i++) {
  25. println("numbers["+i+"]:"+numbers[i]);
  26. //fill(#96948f);
  27. int r, g,b;
  28. b = numbers[i] % 256;
  29. g = (numbers[i] >> 8) % 256;
  30. r = (numbers[i] >> 16) % 256;
  31. fill(r,g,b);
  32. ellipse(((i % 100) * 8)+4, i / 100 + (i / 100 * 8)+4, 8,8);
  33. };
  34. };
  35.  
  36. void draw() {
  37. //This code happens once every frame.
  38. };
Add Comment
Please, Sign In to add comment