Processing – Floral Cursor

For my design, I wanted to incorporate layering many pieces to create my design, much like my inspiration piece. I was inspired by natural forms with repetition, so I decided to create a flower. I layered many circles with different fills and sizes in order to make the center of the flower. For the petals, I used slight transparency in order to highlight where the shapes were overlapping. When the mouse is clicked, the sunflower turns into a daisy by changing the petal colors. I had a lot of fun creating this cursor-like shape.

 

 

 

Code Posted Below:

void setup() {
size(800, 800); //size of canvas
}

void draw() {
background(18,135,175); //blue sky
//petals of flower
stroke(252,203,6,250); //yellow petals
if(mousePressed){ //if user clicks mouse,
stroke(236,227,211,250); //turns petals white
}
strokeWeight(60);
line(mouseX,mouseY,mouseX,mouseY-180);
line(mouseX,mouseY,mouseX,mouseY+180);
line(mouseX,mouseY,mouseX-180,mouseY);
line(mouseX,mouseY,mouseX+180,mouseY);

line(mouseX,mouseY,mouseX-130,mouseY-130);
line(mouseX,mouseY,mouseX+130,mouseY+130);
line(mouseX,mouseY,mouseX-130,mouseY+130);
line(mouseX,mouseY,mouseX+130,mouseY-130);

line(mouseX,mouseY,mouseX-70,mouseY-170);
line(mouseX,mouseY,mouseX+70,mouseY-170);
line(mouseX,mouseY,mouseX-70,mouseY+170);
line(mouseX,mouseY,mouseX+70,mouseY+170);

line(mouseX,mouseY,mouseX-170,mouseY-70);
line(mouseX,mouseY,mouseX+170,mouseY-70);
line(mouseX,mouseY,mouseX-170,mouseY+70);
line(mouseX,mouseY,mouseX+170,mouseY+70);

//center of flower
noStroke();
fill(183, 130, 6);
circle(mouseX, mouseY, 150);
fill(150, 98, 7);
circle(mouseX, mouseY, 130);
fill(109, 85, 3);
circle(mouseX, mouseY, 100);
fill(127, 120, 19);
circle(mouseX, mouseY, 90);
}

Leave a reply

Skip to toolbar