float noiseVal; float noiseScale = 0.005; float noiseCount = 0.0; float noiseSpeed = 0.05; float xCount, xSpeed; float yCount, ySpeed; float theta; float angle; float angleDelta; float xv, yv; float speed = 10; boolean lines = false; int noiseRes = 6; Vehicle[][] vehicle; int xSize = 400; int ySize = 400; int xTotal = int(xSize / noiseRes); int yTotal = int(ySize / noiseRes); void setup(){ size(xSize,ySize); smooth(); ellipseMode(CENTER_DIAMETER); colorMode(HSB, 360); background(51); 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((angle - 180)/3, 100,360); line(x,y, x+(xv/2.0), y+(yv/2.0)); } }