For the first assignment of the class, I decided to mess around and see what I could do with the basic we were taught in the first couple of weeks of the semester. The Processing sketch is a bit simple, as a I begin with straight line going down the middle as the stem for the flower, a main petal before seeing what I can apply. After that I begin to use the commands of when the mouse is pressed to create tiny petals, and go a step further by using the fill random command to bring color into each petal when pressed! I also made a couple abstract triangle’s in the background as well as a sun to also has the random command on it.
Mia Utria.
The Code:
void setup() { //<>//
size(600, 600);
background(105, 205, 222);
noStroke();
fill(250,232,144);
triangle(100,200,33,400,304,203);
strokeWeight(1);
stroke(224,200,77);
triangle(100,300,20,30,50,10); //random sun ray
}
void draw()
{
strokeWeight(4);
stroke(81, 162, 41);
smooth();
line(300, 280, 300, 600);
{
strokeWeight(5);
stroke(3,95,17);
fill(68,183,86);
rect(1,500,600,160); //ground
}
fill(random(255), random(255), random(255, 100)); //sun random color
stroke(250,210,98); //sun outline
ellipse(20,10,100,100); //sun
stroke(222, 96, 121);
fill(245, 143, 164);
ellipse(300, 200, 200, 100); //main petal
{
noStroke();
fill(random(255), random(255), random(255, 100)); //petals random colors
if (mousePressed == true){ //petals appear randomly
ellipse(mouseX, mouseY, 100, 50); //petals
}
}
}