Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. int t = 1;
  2.  
  3. void setup(){
  4. size(512, 512);
  5. noStroke();
  6. }
  7.  
  8. void draw(){
  9. for (int x = 0; x < width; x++){
  10. for (int y = 0; y < height; y++){
  11. int z = (((t<<t^(t>>8))|(t<<7))*((t<<t&(t>>12))|(t<<10))); //THE FORMULA - modify it for other graphic
  12. //Limit to 0-255 (unsigned short, 8 bit) dynamic range
  13. z = z%256;
  14. if (z<0){
  15. z=255+z;
  16. }
  17. fill(z);
  18. rect(x, y, 1, 1);
  19. t++;
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement