Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- int turns = 50;
- float r;
- void setup() {
- size(800, 600);
- background(255);
- img = loadImage("pic2.JPG");
- imageMode(CENTER);
- img.filter(THRESHOLD);
- img.filter(BLUR, 0.7);
- img.loadPixels();
- for (int x=0; x<img.width; x++) {
- for (int y=0; y<img.height; y++) {
- color c = img.get(x, y);
- if (brightness(c)<200) {
- img.pixels[y*img.width+x] = color(0);
- } else {
- img.pixels[y*img.width+x] = color(255);
- }
- }
- }
- img.updatePixels();
- ///*
- for (int i=0; i<turns; i++) {
- pushMatrix();
- translate(width/2, height/2);
- rotate(r);
- tint(255.0/turns*i, 100);
- image(img, 0, 0);
- popMatrix();
- r += TWO_PI/turns;
- }
- }
- void draw() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement