void render(creature c) { drawCellBacking(c.phenotype,32); // drawMembrane(c.phenotype); blur(2); drawLattice(c.phenotype); drawLines(c.phenotype); drawCells(c.phenotype); blur(1); drawCellBlob(c.phenotype,20); } void drawCellBacking(lattice phen,float r) { noStroke(); for(int n=0;n0;i-=4) { float v=.2*((r*1.1)-(i/r)); switch(phen.nodes[n].g.rkey) { case 0: //struct fill(255-5*(i/r),v*v); break; case 1: //neuron fill(255-30*(i/r),255-10*(i/r),255-1*(i/r),v*v); break; case 2: //muscle fill(255-1*(i/r),255-12*(i/r),255-30*(i/r),v*v); break; case 3: //sensor fill(255-25*(i/r),255-1*(i/r),255-25*(i/r),v*v); break; } position p=phen.nodes[n].p; ellipse(p,i); fill(0); ellipse(p,15); } } } void drawCellBlob(lattice phen,float r) { for(int n=0;n0;i-=2) { fill(0,(r-(i/r))*7); if(phen.nodes[n].n.firing) { ellipse(p,i*1.1); } else ellipse(p,i); } } /* for(int m=0;m