//Rhea Nayyar
//rnayyar@andrew.cmu.edu
//Section C
//Project 04 String Art
function setup() {
createCanvas(640, 480);
}
function draw() {
background('Plum');
var y = 4
stroke('PowderBlue'); //tiled blue rectangles
strokeWeight(1);
fill('Plum');
for (var x = 1; x < 640; x+=25){
rect(x,0,640,y); //across
rect(0,x,640,y); //vertical
y=y*1.777777;
}
var y = 2
for (var i = 0; i < 600; i+=15) {
strokeWeight(1);
fill('Plum');
stroke('Lime');
ellipse(320,240,800/y,400/y); //concentric ellipses in the middle
stroke('Indigo');
line(640,0,0,y); //Purple diagonal lines from (640,0)
y=y*1.333333;
}
var y = 2
for (var i = 0; i < 640; i+=15) {
stroke('DeepPink');
strokeWeight(1);
line(0,0, 640,y); //Hot pink lines from 0,0
y=y*1.333333;
}
fill('Peru'); //Flower Pot
stroke(0);
rect(310,220,20,20);
stroke('OliveDrab'); //Leaves and Stem
strokeWeight(3);
line(320,218,320,190);
fill('OliveDrab');
ellipse(313,200,10,5);
ellipse(328,200,10,5);
fill('LightPink') //Flower Center
strokeWeight(1);
stroke(0);
ellipse(320,185,10,10);
fill('PeachPuff'); //Petals
triangle(315,185,310,180,310,190);
triangle(325,185,330,180,330,190);
triangle(320,180,315,175,325,175);
triangle(322,245,328,240,325,250);
}
This took me ages. I had no idea what I was doing. I still don’t really understand. It looks cool, I guess. I like the concentric pattern in the middle. It ended up being very “Vaporwave” by accident but I like it. It’s definitely not as complex as others, unfortunately. I guess it’s almost a meditative piece, focusing on the cyclical existence of plant life. Hence the lost petal.