Allround Webdesigner
void setup() { size(480, 480); } void draw() { rectMode(CENTER); rect(240, 280, 200, 400); rect(240, 450, 100, 60); line(240, 480, 240, 420); rect(240, 380, 100, 30); line(240, 395, 240, 365); rect(240, 310, 100, 30); line(240, 325, 240, 295); rect(240, 240, 100, 30); line(240, 255, 240, 225); rect(240, 170, 100, 30); line(240, 185, 240, 155); }
void setup() { size(480, 480); } void draw() { rectMode(CENTER); fill(0, 0, 255); rect(240, 170, 300, 60); fill(255, 255, 255); rect(240, 110, 300, 60); fill(255, 0, 0); rect(240, 50, 300, 60); }
void setup() { size(600, 600); noStroke(); } void draw() { background(126); fill(#FF0000); rect(mouseX,mouseY+20, 200, 50); // Top fill(#ffffff); rect(mouseX,mouseY+70, 200, 50); // Middle fill(#0000ff); rect(mouseX,mouseY+120, 200, 50); // Bottom }
int diameter = 400; void setup(){ size(400,400); } void draw(){ background(#282828); stroke(0); fill(255, 0, 0); ellipse(width/2,height/2,diameter,diameter); if(diameter > 0){ diameter -= 1; } else{ diameter = 0; } }
import gab.opencv.*; import processing.video.*; import java.awt.*; Capture video; OpenCV opencv; void setup() { size(640, 480); video = new Capture(this, 640/2, 480/2); opencv = new OpenCV(this, 640/2, 480/2); opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE); video.start(); } void draw() { scale(2); opencv.loadImage(video); image(video, 0, 0 ); noFill(); stroke(0, 255, 0); strokeWeight(3); Rectangle[] faces = opencv.detect(); println(faces.length); for (int i = 0; i println(faces[i].x + "," + faces[i].y); ellipse(faces[i].x+40, faces[i].y+20, faces[i].width, faces[i].height); } } void captureEvent(Capture c) { c.read(); }
import gab.opencv.*; import processing.video.*; import java.awt.*; Capture video; OpenCV opencv; void setup() { size(640, 480); video = new Capture(this, 640/2, 480/2); opencv = new OpenCV(this, 640/2, 480/2); opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE); video.start(); } void draw() { scale(2); opencv.loadImage(video); image(video, 0, 0 ); fill(0); Rectangle[] faces = opencv.detect(); println(faces.length); for (int i = 0; i println(faces[i].x + "," + faces[i].y); rect(faces[i].x-10, faces[i].y+10, faces[i].width+20, faces[i].height/3); } } void captureEvent(Capture c) { c.read(); }
import gab.opencv.*; import processing.video.*; import java.awt.*; PImage image1; Capture video; OpenCV opencv; void setup() { size(640, 480); video = new Capture(this, 640/2, 480/2); opencv = new OpenCV(this, 640/2, 480/2); opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE); image1 = loadImage("mask.png"); video.start(); } void draw() { scale(2); opencv.loadImage(video); image(video, 0, 0 ); fill(0); Rectangle[] faces = opencv.detect(); println(faces.length); for (int i = 0; i println(faces[i].x + "," + faces[i].y); image(image1, faces[i].x, faces[i].y, faces[i].width, faces[i].height); } } void captureEvent(Capture c) { c.read(); }