Rothko Simulator

Mark Rothko, (1903-1970) was associated with the Abstract Expressionist movement, and his signature style featured large fields of diffuse, often complimentary colour, painted on canvasses that were often very large in scale.


This program allows you to create your own Rothko painting.

Here’s what to do;

Press the left mouse button anywhere on the canvas to create a large colour field

Press the right mouse button to make a thinner stripe

Press any key to erase and start over

 

//Info: http://processingjs.org/reference

// draws simulated Rothko. press left mouse to draw colour fields
// press right mouse for narrow band

void setup() {
size (350, 460);
background (random(107, 229), random(107, 229), random(107, 229));
smooth();
frameRate(4000);
}

void draw() {
}

void mousePressed() {

if (mousePressed &&(mouseButton == LEFT)) {

int xx1 = (mouseX);
int yy1 = (mouseY);

int wwidth = (width – (int)random(30, 40)); // adjust rectangle size
int xright = width-wwidth;
int xleft = (-10)+wwidth;
int hheight = ((int)random(70, 100)); // adjust rectangle size
int ydown = yy1+hheight;
int yup = yy1-hheight;

colourpick(); // pick random colour for lines

loop=60000;

for (int count = 0; count =xright) { // keeps line inside box
xx2 = xx2-((int)random(10, 20));
}
if (xx2=ydown) {
yy2 = yy2 -((int)random(10, 20));
}
if (yy2<=yup) {
yy2 = yy2 +((int)random(10, 20));
}

line (xx1, yy1, xx2, yy2);
xx1=xx2;
yy1=yy2;
}
}

if (mousePressed &&(mouseButton == RIGHT)) {

int xx1 = (mouseX);
int yy1 = (mouseY);

int wwidth = (width – (int)random(45, 50)); // adjust rectangle size
int xright = width-wwidth;
int xleft = (-10)+wwidth;
int hheight = ((int)random(20, 30)); // adjust rectangle size
int ydown = yy1+hheight;
int yup = yy1-hheight;

colourpick(); // pick random colour for lines
loop=15000;

for (int count = 0; count =xright) { // keeps line inside box
xx2 = xx2-((int)random(10, 20));
}
if (xx2=ydown) {
yy2 = yy2 -((int)random(10, 20));
}
if (yy2<=yup) {
yy2 = yy2 +((int)random(10, 20));
}

line (xx1, yy1, xx2, yy2);
xx1=xx2;
yy1=yy2;
}
}
}

void keyPressed() {
background (random(107, 229), random(107, 229), random(107, 229));
}

void colourpick(){ // picks one of 5 colours for line

int c;
c = (int) random(5); // picks one of 5 colours
if (c == 0) stroke (223 +(random(20)), 110+(random(20)), 4+(random(20)), 30); // orange
if (c == 1) stroke (175+(random(20)), 9+(random(20)), 2+(random(20)), 20); // red
if (c == 2) stroke (21+(random(20)), 40+(random(20)), 93+(random(20)), 20); // blue
if (c == 3) stroke (66+(random(20)), 111+(random(20)), 48+(random(20)), 25); // green
if (c == 4) stroke (240+(random(20)), 230+(random(20)), 115+(random(20)), random(15)); // dark

}

void rolldiceX() { // pick random number

dicex=((int)random(-20, 20));
if (dicex == 0) { // if result is 0 go again
rolldiceX();
}
}

void rolldiceY() { // pick random number
dicey=((int)random(-20, 20));
if (dicey == 0) { // if result is 0 go again
rolldiceY();
}
}

int dicex;
int dicey;
int xx1;
int yy1;
int wwidth;
int hheight;
int xright;
int xleft;
int yup;
int ydown;
int xx2;
int yy2;
int scale;
int loop;

4 thoughts on “Rothko Simulator”

  1. I love it Dominic, and we get to see a working blog page too- Thank you for your Generosity! I am going to have a little set of my own Rothko’s printed off.
    We can say we were there at the start………..

    Roseanne

    1. Thanks paul, mostly worked fine, had to rewrite a few bits of the code on a few of them with some variables going astray once I inserted them. Nice plugin though.

Leave a Reply to dominic Cancel reply

Your email address will not be published.