Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int t = 1;
- void setup(){
- size(512, 512);
- noStroke();
- }
- void draw(){
- for (int x = 0; x < width; x++){
- for (int y = 0; y < height; y++){
- int z = (((t<<t^(t>>8))|(t<<7))*((t<<t&(t>>12))|(t<<10))); //THE FORMULA - modify it for other graphic
- //Limit to 0-255 (unsigned short, 8 bit) dynamic range
- z = z%256;
- if (z<0){
- z=255+z;
- }
- fill(z);
- rect(x, y, 1, 1);
- t++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement