xxxxxxxxxx
22
var start, end;
var position;
function setup() {
createCanvas(400, 400);
start = createVector(width/2, height/2);
end = createVector(0, 0);
// position = createVector(start.x, start.y);
position = start;
}
function draw() {
background(220);
var w = end.x - start.x;
var h = end.y - start.y;
// position.x = position.x + w / 100;
position.x += w / 100;
position.y += h / 100;
ellipse(position.x,position.y,10,10);
}