// declare font PFont font; //a variable to store the maximum # of elements in the array int MAX = 10; //declare array names and allocate the space to store them char[] ch = new char[MAX]; int[] chx = new int[MAX]; int[] chy = new int[MAX]; void setup() { // load font & declare font size font = loadFont ("CenturyGothic-48.vlw"); textFont(font, 48); // declare scene setup size(600, 600); background(0); smooth(); // generate variables of array for (int i = 0; i < MAX; i++) { ch[i] = char(int(48+i)); chx[i] = int (100+i*40); chy[i] = int (100); } } void draw() { // clear background // background(0); fill(0,random(5)); rect(0,0,width,height); // draw elements for (int i = 0; i < MAX; i++) { fill(random(255),random(30)); chy[i] = int (random(height/2-10,height/2+10)); text (ch[i], chx[i], chy[i]) ; } } void mousePressed() { // clear background background(0); // generate an integer as a starting point int chrnd = int(random(48,120)); // store ascii string to array for (int i = 0; i < MAX; i++) { ch[i] = char(chrnd+i); } }