My midterm assignment tries to emulate the work of Jackson Pollack, an artist whose work I really enjoy. I really enjoy abstract art, and I thought the idea of trying to emulate the strokes he makes through code could make for a really interesting midterm project. I like the idea of bridging the physical into the digital, which is another reason why I wanted to try this.
Currently, my program creates a series of lines that will travel randomly and vary in its stroke size. It creates the lines in segments, and will occasionally break the line and start in a new place. I have 3 of these objects, all in different colors, that will draw the segments. You can click on the screen to generate a new set of lines, replacing the old ones. The code for the line drawer can be seen here:
class Drawer { constructor(seg, swScale) { this.seg = seg; this.swScale = swScale; this.sw = width * random(0.0002, 0.005); this.frame = width * 0.05; this.angVary = PI * 0.02; this.edgeBuff = height * 0.08; this.lineLength = height * 0.001; this.x = round(random(width)); this.y = round(random(height)); this.prevX = this.x; this.prevY = this.y; this.ang = random(PI * 2); if (random(2) < 1) { this.ang = PI * 0.25; } else { this.ang = PI * 0.75; } } makeLines() { for (let i = 0; i < this.seg; i++) { this.ang = this.ang + random(-this.angVary, this.angVary); this.x = this.lineLength * sin(this.ang) + this.x; this.y = this.lineLength * cos(this.ang) + this.y; if ( this.x > width || this.x < 0 || this.y > height || this.y < 0 ) { this.ang += 0.2; } this.sw += width * random(-0.00003, 0.00003); this.sw = constrain(this.sw, width * 0.0001, width * 0.009); strokeWeight(this.sw * this.swScale); line(this.prevX, this.prevY, this.x, this.y); this.prevX = this.x; this.prevY = this.y; if (random(1000) < 1) { this.sw = width * random(0.0002, 0.005); this.x = round(random(width)); this.y = round(random(height)); this.prevX = this.x; this.prevY = this.y; this.ang = random(PI * 2); if (random(2) < 1) { this.ang = PI * 0.25; } else { this.ang = PI * 0.75; } } } } }
Creating this object was the most difficult part so far. I was trying to figure out ways to make the lines move randomly but not too erratically. After much trial and error, I managed to make some numbers that looked good to me.
My next steps are to add the paint blobs, which I think could be the hardest part, because I want them to be misshapen. After that, I can work more on the interactivity by adding such things as ways to modify the amount of lines made. I also want to add more layers, because right now there is a lot of empty space and I want to minimize that at bit more. Adding more layers will also make the pieces look more interesting and make them look more like a Pollack piece, which has countless layers of paint on them. The last part I intend to do is work on is adding more colors, I am perhaps thinking about using random colors, but I am unsure how this will end up looking.