Cell[] myCells= new Cell[1000];
for (int i=0; i<333 ;i++) {
myCells[i]=new Cell(100, 200, 139, 0, 0);
for (int i=333; i<500 ;i++) {
myCells[i]=new Cell(200, 300, 234, 100, 0);
for (int i=500; i<666 ;i++) {
myCells[i]=new Cell(300, 400, 0, 100, 0);
for (int i=666; i<1000 ;i++) {
myCells[i]=new Cell(300, 100, 113, 198, 113);
myCells[200].isseed=true;
myCells[400].isseed=true;
myCells[600].isseed=true;
myCells[800].isseed=true;
for (int i=0; i<myCells.length;i++) {
for (int i=0; i<myCells.length; i++) {
if (myCells[i].isseed== false) {
for (int j=0; j<myCells.length; j++) {
if (myCells[j].isseed==true) {
d= PVector.dist(myCells[i].location, myCells[j].location);
stroke(myCells[j].cellred, myCells[j].cellgreen, myCells[j].cellblue );
line(myCells[i].location.x, myCells[i].location.y,myCells[i].location.z, myCells[j].location.x, myCells[j].location.y,myCells[j].location.z);
PVector location= new PVector();
PVector velocity=new PVector();
float cellred, cellgreen, cellblue;
Cell(int x, int y, int red, int gr, int bl) {
location = new PVector(random(x-50,x+50), random(y-50,y+50),random(40,100));
strokeWeight(lineweight);
fill(cellred, cellgreen, cellblue);
ellipse(location.x, location.y, dia, dia);
velocity = new PVector(random(-10, 10), random(-10, 10));