// Color values int r = 0; int g = 0; int b = 0; // Vertical location tracker int v = 0; void setup(){ size(510,255); background(0,0,0); } void loop(){ drawLine(); v++; } void drawLine(){ for(int h=0;h<=width;h++){ // Prepare new color if(r == 255){ g++; r = 0; }else{ r++; } if(g == 255){ b++; g = 0; }else{ g++; } if(b == 255){ r++; b = 0; }else{ b++; } // Set color stroke(r,g,b); // Draw point point(h,v); } }