How do you use distance and println to make two ellipses change color when they pass through each other?
Can someone give me a sample code? Pleasee helpp . I'm getting a headache from this . And this is what I have so far:
int xpos=100;
int ypos=100;
int xspeed=3;
int yspeed=7;
int xpos1=80;
int ypos1=100;
int xspeed1=4;
int yspeed1=3;
float distance;
float radius;
float diameter;
float value;
float r,g,b;
int x1;
int x2;
int y1;
int y2;
void setup() {
size(400,400);
}