class Cell { int followerR = 20; float focusX; float focusY; float mfocusX; float mfocusY; Follower[] followers; int numFollowers = 10; Rectangle granny; float valR; float valG; float valB; Cell(Rectangle r, float startX, float startY, float mfocX, float mfocY) { granny = r; //makes cell out of Follower class focusX = startX; focusY = startY; mfocusX = mfocX; mfocusY = mfocY; followers = new Follower[numFollowers]; for(int i = 0; i < numFollowers; i++) { followers[i] = new Follower(this); } } void drawCell() { focusX += mfocusX; focusY += mfocusY; valR = granny.cellR; valG = granny.cellG; valB = granny.cellB; //movement of focus spot fill(255); //ellipse(focusX + mfocusX, focusY + mfocusY, 10,10); if (focusX > granny.right || focusX < granny.left ){ mfocusX *= -1; } if (focusY > granny.bottom || focusY < granny.top ){ mfocusY *= -1; } //draws ellipses in cell fill(0); for(int i = 0; i < numFollowers; i++) { followers[i].drawFollower(); } //checks if focus dot is hitting other cells for( int i=0; i= follower.mx - (followerR)) && (focusX <= follower.mx + (followerR)) && (focusY >= follower.my - (followerR)) && (focusY <= follower.my + (followerR))) { mfocusX *= -1; } } }