Intro to Processing

Having gone over some basics in Processing, our first assignment was to create our own simple screen drawing, programmically. I chose to try to replicate a piece by Ron Gang called Windmill. Below is the original oil on canvas by Gang.

"Windmill" by Ron Gang

Here is my version created using Processing.

It’s not exactly the same. I couldn’t figure out how to get the lines to change to yellow toward the center where the beams overlap. But overall, not too bad if I say so myself…

Here is the code I used to draw the lines.

//setup
int canvasTop = 0;
int canvasLeft = 0;
int canvasBottom = 514;
int canvasRight = 700;
int alphaVal;

noStroke();
smooth();

size(canvasRight,canvasBottom);
background(92,183,176);

fill(216,226,114);
triangle(184,canvasBottom, 366,canvasBottom, 274,94);

//yellow flame
fill(216,226,114, 100);
noStroke();
quad(274,126, 314, 98, 274, -30, 236, 98);

fill(92,183,176);
quad(273,238,310,274,271,124, 236,275);

//light blue star lines
strokeWeight(10);
stroke(144, 207, 186);
line(174, canvasBottom, 298, canvasTop);
line(376, canvasBottom, 247, canvasTop);
line(41, canvasBottom,460, canvasTop);
line(510, canvasBottom, 75, canvasTop);
line(canvasLeft, 314, 635, canvasTop);
line(canvasLeft, 227, canvasRight, 222);
line(canvasLeft, 50, canvasRight, 373);

//red line
stroke(235, 93, 109);
line(114, canvasTop, canvasRight, 267);

//dark pink
stroke(126,118, 159);
line(canvasLeft, 404, 335, canvasTop);

//pink line
stroke(172,116,163);
line(canvasLeft, 209, 433, canvasTop);

//dark green line
stroke(99,161,146);
line(canvasLeft, 128, canvasRight, 117);

//dark blue lines
stroke(96,117,182, 100);
strokeWeight(10);
line(canvasRight, 319, canvasTop, canvasLeft);
stroke(96,117,182, 30);
line(425, canvasBottom, 311, canvasTop);
line(125, canvasBottom, 247, canvasTop);
stroke(96,117,182, 50);
line(canvasRight, 162, canvasLeft, 172);
line(canvasLeft, 263, 533, canvasTop);
stroke(96,117,182);
line(80,canvasBottom, 199, 0);
line(345, canvasTop, 475, canvasBottom);

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.