// pow(x,2) is too meh
float square(float x) {
return x*x;
}
void setup() {
size(400, 400);
// variable values
PVector pos1 = new PVector(100, 100);
PVector pos2 = new PVector(250,150);
PVector vel1 = new PVector(20, 20);
PVector vel2 = new PVector(-10, 10);
float r=30;
PVector intersection = new PVector();
noStroke();
// before
fill(#ff0000);
// REMEMBER! ellipse() takes the width/height as the third/fourth arguments
// and NOT the radii
ellipse(pos1.x, pos1.y, 2*r, 2*r);
ellipse(pos2.x, pos2.y, 2*r, 2*r);