xxxxxxxxxx
void setup() {
size(360, 720);
background(255, 255, 255);
frameRate(3);
}
void draw() {
fill(255, 50);
rect(0, 0, width, height);
//representation of parochial spaces, affecting the city or grid
for (int i=0; i<1; i++) {
fill(random(40, 80), random(10, 200), random(50, 100));
//fill(0, 0, 0);
int p1x = (int) random(1, 360);
int p1y = (int) random(1, 720);
int p2x = (int) random(0, 20);
int p2y = (int) random(0, 10);
int ex = (int) random(1, 500);
int ey = (int) random(1, 300);
//parochial spaces
noStroke();
ellipse(p1x, p1y, p2x, p2y);
//elements interacting with the parochial spaces
fill(255, 0, 0);
float x2 = map(p1x, 0, p1y +2, 100, 300);
ellipse(x2, p1y, p2x, p2y);
//line between the parochial and the external elemet
fill(0, 255, 0);
stroke(0, 0);
line(p1x, p1y, x2, p1y);
//line between the parochial s. and the grid
stroke(0, 50);
line(p1x, p1y, mouseX, mouseY);
//representation of the adaptable grid or city
fill(random(40, 80), random(10, 200), random(50, 100), 10);
stroke(0, 20);
ellipse(mouseX, mouseY, ex, ey);
}
}