PImage img; // The source image PImage kuss; int akt = -1; Eye e1, e2; int[][] wo_kuessen = new int[100][3]; import processing.video.*; Movie kiss5; void setup() { size(600, 600); img = loadImage("lecorbusier_01.jpg"); // Load the image kuss = loadImage("kuss_for_corb.gif"); smooth(); noStroke(); e1 = new Eye( 240, 300, 100); e2 = new Eye( 410, 260, 100); } void draw() { background(img); e1.update(mouseX, mouseY); e2.update(mouseX, mouseY); e1.display(); e2.display(); for (int i=0; i<= akt; i++) { image(kuss,wo_kuessen[i][0],wo_kuessen[i][1]); } } class Eye { int ex, ey; int size; float angle = 0.0; Eye(int x, int y, int s) { ex = x; ey = y; size = s; } void update(int mx, int my) { angle = atan2(my-ey, mx-ex); } void display() { pushMatrix(); translate(ex, ey); fill(255); ellipse(0, 0, size, size); rotate(angle); fill(0); ellipse(size/4, 0, size/2, size/2); popMatrix(); } } void mousePressed() { akt ++; wo_kuessen[akt][0] = mouseX-40; wo_kuessen[akt][1] = mouseY-40; wo_kuessen[akt][2] = mouseX*mouseY; size(600, 600); kiss5 = new Movie(this, "kiss5.html"); kiss5.play(); image(kiss5, 0, 0); }