float noiseVal; float noiseScale = 0.005; float noiseCount = 0.0; float noiseSpeed = 0.005; float xCount, xSpeed; float yCount, ySpeed; float theta; float angle; float angleDelta; float xv, yv; float speed = 10; int noiseRes = 6; Vehicle[][] vehicle; int xSize = 800; int ySize = 600; int xTotal = int(xSize / noiseRes); int yTotal = int(ySize / noiseRes); void setup(){ size(xSize,ySize); smooth(); background(255); vehicle = new Vehicle[yTotal][xTotal]; for (int y=0; y width + 50){ x -= width + 100; } if (y < -50){ y += height + 100; } else if (y > height + 50){ y -= height + 100; } } void render(){ stroke(0,3); line(x,y, x-(-xv/1.0), y-(-yv/1.0)); //stroke(255, 5); //point(x,y); } }