daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // original code by jer thorpe apri 2010
  2. // hacked by roland tanglao september 2010
  3.  
  4. void setup() {
  5.   //This code happens once, right when our sketch is launched
  6.   size(800,600);
  7.   background(255);
  8.   smooth();
  9.  
  10.   //Ask for the list of numbers
  11.   int[] numbers = getNumbers();
  12.   noStroke();
  13.   for (int i = 0; i < numbers.length; i++) {
  14.     println("numbers["+i+"]:"+numbers[i]);
  15.     int r, g,b;
  16.     b = numbers[i] % 256;
  17.     g = (numbers[i] >> 8) % 256;
  18.     r = (numbers[i] >> 16) % 256;
  19.     fill(r,g,b);
  20.     ellipse(((i % 50) * 16)+8, i / 50 + (i / 50 * 16)+8, 16,16);
  21.   };
  22. };
  23.  
  24. void draw() {
  25.   //This code happens once every frame.
  26. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top