GMU:Actors, Traces, Collectives/SS17/sketch01

From Medien Wiki
< GMU:Actors, Traces, Collectives‎ | SS17
Revision as of 21:29, 13 August 2017 by Max (talk | contribs) (Max moved page GMU:Actors, Traces, Collectives/sketch01 to GMU:Actors, Traces, Collectives/SS17/sketch01: gleicher kurs im WS)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
void setup() {
  size(640,360);
}

void draw() {
  background(255);

  PVector mouse  = new PVector(mouseX,mouseY);
  PVector center = new PVector(width/2,height/2);

  mouse.sub(center);

  translate(width/2,height/2);
  line(0,0,mouse.x,mouse.y);
}