im trying to figure out, how i can create 2 equal circles hitting each other in the middle of the frame.
the following code creates 2 circles but after they encounter only one of them is moving, but i want them both mobing away from each other and hit again in the middle...
PVector pos, posA, vel, velA, velB;
int rad;
void setup()
{
size(400, 400);
pos = new PVector (width/4, height/2);
posA = new PVector (width/2, height/2);
vel = new PVector (0, 0);
velA = new PVector (-2, 0);
rad = 20;
//vel = new PVector (.1, 0);
//velA = new PVector (-1, 0);