int arrayLength = 2400; //array length int gapTrackLength = 155; //155when recording the spaces between primes, allow for lengths between 0 and 155 in the array int[] start = new int[arrayLength]; int[] end = new int[arrayLength]; String [] numbers = new String [arrayLength]; int [] primeGap = new int [arrayLength]; int [] gapRecord = new int [gapTrackLength]; float [] h = new float [gapTrackLength]; float [] s = new float [gapTrackLength]; float [] b = new float [gapTrackLength]; String dataSet; int lastIndex=0; int arrayPosition=0; //array position int lastPosition; int primeCountCorrected; float maxGap=0; int x=0; int lastX=0; float y; float rowCount=0; float rows; int rowHeight = 25; int loopCount=0; boolean run=true; void setup(){ //parse the database of prime numbers and create a single string from it String primes = "primes2.txt"; String [] lines = loadStrings(primes); dataSet = join (lines, ""); size (900,550); colorMode(HSB,100); frameRate(500); noStroke(); smooth(); rectMode(CORNER); background(50); rows= height/rowHeight; } void draw(){ logic(); calculateColorTable(); stripes(); stopThinkingSoHard(); // interactWithNumbers(); if (run){ arrayPosition++; // println(arrayPosition + "," + maxGap); } }