The code for this generator is given below. The array at the start is admittedly there for the purposes of understanding the function of an array in Processing. The code functions without it.
//Create the array to pick between Red, Green and Blue
//This is a complex array to create, it is possible to just use a string of numbers
//I used this array to test things and just have an understanding of Arrays
color rValue = color (int(random(0,255)),0,0);
color gValue = color (0,int(random(0,255)),0);
color bValue = color (0,0,int(random(0,255)));
color[] rgbValue = new color[3];{
rgbValue[0] = rValue;
rgbValue[1] = gValue;
rgbValue[2] = bValue;
}
PFont f;
void setup(){
size(1000,1000);
background(255);
noLoop();
}
void draw(){
//Displaying the Company Name
background (255);
color arrayRand = (color)random(rgbValue.length);
f = createFont("REVOLUTION.ttf",32,true);
textFont(f,80);
fill(0,100);
text("ITERATE",335,895);
textFont(f,80);
fill(100);
text("ITERATE",335,885);
int grid=int(random(1,4));
if (grid==2){{
if (arrayRand==0){
for (int i = 350; i < 750; i = i+150) {
for (int j = 350; j < 750; j = j+150) {
strokeWeight (int(random (50,140)));
stroke(int(random(100,200)));
point(i,j+10);
stroke(int(random(100,255)),25,25,int(random(200,255)));
point(i, j);
}}
} else if (arrayRand==1){
for (int i = 350; i < 750; i = i+150) {
for (int j = 350; j < 750; j = j+150) {
strokeWeight (random(50,140));
stroke(int(random(100,200)));
point(i,j+10);
stroke(25,int(random(100,255)),25,int(random(200,255)));
point(i, j);
}}
} else {
for (int i = 350; i < 750; i = i+150) {
for (int j = 350; j < 750; j = j+150) {
strokeWeight (random(50,140));
stroke(int(random(100,200)));
point(i,j+10);
stroke(25,25,int(random(100,255)),int(random(200,255)));
point(i, j);
}}
}}
}else if (grid==1){{
if (arrayRand==0){
for (int i = 400; i < 800; i = i+200) {
for (int j = 400; j < 800; j = j+200) {
strokeWeight (int(random (50,140)));
stroke(int(random(100,200)));
point(i,j+10);
stroke(int(random(100,255)),25,25,int(random(200,255)));
point(i, j);
}}
} else if (arrayRand==1){
for (int i = 400; i < 800; i = i+200) {
for (int j = 400; j < 800; j = j+200) {
strokeWeight (random(50,140));
stroke(int(random(100,200)));
point(i,j+10);
stroke(25,int(random(100,255)),25,int(random(200,255)));
point(i, j);
}}
} else {
for (int i = 400; i < 800; i = i+200) {
for (int j = 400; j < 800; j = j+200){
strokeWeight (random(50,140));
stroke(int(random(100,200)));
point(i,j+10);
stroke(25,25,int(random(100,255)),int(random(200,255)));
point(i, j);
}}
}}
} else if (grid==3){
if (arrayRand==0){
for (int i = 275; i < 775; i = i+150) {
for (int j = 275; j < 775; j = j+150) {
strokeWeight (int(random (50,140)));
stroke(int(random(100,200)));
point(i,j+10);
stroke(int(random(100,255)),25,25,int(random(200,255)));
point(i, j);
}}
} else if (arrayRand==1){
for (int i = 275; i < 775; i = i+150) {
for (int j = 275; j < 775; j = j+150) {
strokeWeight (random(50,140));
stroke(int(random(100,200)));
point(i,j+10);
stroke(25,int(random(100,255)),25,int(random(200,255)));
point(i, j);
}}
} else {{
for (int i = 275; i < 775; i = i+150) {
for (int j = 275; j < 775; j = j+150) {
strokeWeight (random(50,140));
stroke(int(random(100,200)));
point(i,j+10);
stroke(25,25,int(random(100,255)),int(random(200,255)));
point(i, j);
}}
}}
}
}
//Generates a logo only after pressing the enter key
void keyPressed() {
if (key == ENTER){
saveFrame("logo-###1.jpg");
redraw();
}
}