class NodeSpace { Node[] nodes; int numNodes; int w,h,d; int w2,h2,d2; NodeSpace(int widthOfSpace,int heightOfSpace,int depthOfSpace, int maxNodes) { w=widthOfSpace; h=heightOfSpace; d=depthOfSpace; w2=0; h2=0; d2=0; nodes=new Node[maxNodes]; numNodes=0; } void addNode(Node n) { nodes[numNodes++]=n; } void update() { for(int i=0; i=0) { // compute potential at curr point //potential=noise(pos[0]*0.1,sliceY*0.1,pos[2]*0.1); potential=calcPotentialAt(pos[0],pos[1],pos[2]); if (potential>isoLevel1 && potential=0) { // compute potential at curr point //potential=noise(pos[0]*0.1,sliceY*0.1,pos[2]*0.1); potential=calcPotentialAt(pos[0],pos[1],pos[2]); if (potential>isoLevel1 && potential=0 && nodes[i].currPos.x<=w && nodes[i].currPos.y>=0 && nodes[i].currPos.y<=h && nodes[i].currPos.z>=0 && nodes[i].currPos.z<=d) { nodes[i].draw(); } } } }