// IK int count; int cellSize = 40; int wideCount = 2; int highCount = 10; int numSegments = 2; float[][] x = new float[numSegments][wideCount]; float[][] y = new float[numSegments][wideCount]; float[] angle = new float[numSegments]; //ArrayList xArray; //ArrayList yArray; //ArrayList aArray; float segLength = 15; float targetX, targetY; float ballX = 50; float ballY = 50; int ballXDirection = 1; int ballYDirection = -1; void setup() { size(640, 200); smooth(); strokeWeight(20.0); stroke(0, 100); noFill(); wideCount = (width/cellSize); highCount = (height/cellSize); count = wideCount * highCount; // xArray = new ArrayList(wideCount/cellSize); // yArray = new ArrayList(highCount/cellSize); //aArray = new ArrayList(wideCount/cellSize); } void draw() { background(226); moveBall(); for(int k=0;k=1; i--) { positionSegment(i, i-1, k); // puts each segment in relative place } // THIS one places the segments with X and Y for(int i=0; i