Oh, that naughty sketch! Please let us know what the issue is below.
Apply Template
Applying this template will reset your sketch and remove all your changes. Are you sure you would like to continue?
Report Sketch
Report Comment
Please confirm that you would like to report the comment below.
We will review your submission and take any actions necessary per our Community Guidelines. In addition to reporting this comment, you can also block the user to prevent any future interactions.
Please report comments only when necessary. Unnecessary or abusive use of this tool may result in your own account being suspended.
Are you sure you want to delete your sketch?
Any files uploaded will be deleted as well.
Delete Comment?
This will also delete all the replies to this comment.
Delete this tab? Any code in it will be deleted as well.
Select a collection to submit your sketch
We Need Your Support
Since 2008, OpenProcessing has provided tools for creative coders to learn, create, and share over a million open source projects in a friendly environment.
Niche websites like ours need your continued support for future development and maintenance, while keeping it an ad-free platform that respects your data and privacy!
Please consider subscribing below to show your support with a "Plus" badge on your profile and get access to many other features!
CC Attribution ShareAlike
NAFIS SABIR HW_2_1_3_Final
Sabir
xxxxxxxxxx
/*Nafis Sabir
Professor Calli Higgins
HW 2.1.1*/
void setup() {
size(800, 800);//window size
background(0, 150, 255);//background color
strokeWeight(9);//weight for stems
stroke(10, 200, 0);//stem color
line(200, 303, 200, 700);//stem 1
line(560, 503, 560, 700);//stem 2
line(380, 403, 380, 700);//stem 3
noStroke();//removed stroke from flowers
fill(0, 0, 255);//blue color for left flower
arc(200, 200, 200, 200, 0, PI+QUARTER_PI);//left flower
fill(146, 0, 206);//purple color for middle flower
arc(380, 300, 200, 200, 0, PI+QUARTER_PI);//middle flower
fill(255, 100, 255);//pink color for left flower
arc(560, 400, 200, 200, 0, PI+QUARTER_PI);//right flower
}
void draw() {
smooth();//pixel smoothing
}
void keyPressed() { //color change to night onvkey press
background(25, 25, 112);//background night color
strokeWeight(9);//weight for pads
stroke(0, 255, 0);//pad color
ellipse(200, 300, 140, 10);//left pad
ellipse(380, 400, 140, 10);//middle pad
ellipse(560, 500, 140, 10);//right pad
noStroke();//no stroke on flowers
fill(255, 225, 0);//yellow color for left flower
arc(200, 200, 200, 200, 0, PI+QUARTER_PI);//left flower
fill(255, 69, 0);//orange color for middle flower
arc(380, 300, 200, 200, 0, PI+QUARTER_PI);//middle flower
fill(255, 0, 0);//red color for right flower
arc(560, 400, 200, 200, 0, PI+QUARTER_PI);//right flower
}
void mousePressed() { //change colors to day on mouse press
background(0, 150, 255);//background day color
strokeWeight(9);//weight for stems
stroke(10, 200, 0);//stem color
line(200, 303, 200, 700);//stem 1
line(560, 503, 560, 700);//stem 2
line(380, 403, 380, 700);//stem 3
noStroke();//removed stroke from flowers
fill(0, 0, 255);//blue color for left flower
arc(200, 200, 200, 200, 0, PI+QUARTER_PI);//left flower
fill(146, 0, 206);//purple color for middle flower
arc(380, 300, 200, 200, 0, PI+QUARTER_PI);//middle flower
fill(255, 100, 255);//pink color for left flower
arc(560, 400, 200, 200, 0, PI+QUARTER_PI);//right flower
}
void mouseMoved() {
fill(mouseX, 0, mouseY);//color change for flowers on mouse move
arc(200, 200, 200, 200, 0, PI+QUARTER_PI);//left flower
arc(380, 300, 200, 200, 0, PI+QUARTER_PI);//middle flower
arc(560, 400, 200, 200, 0, PI+QUARTER_PI);//right flower
}
//Done by Nafis Sabir
See More Shortcuts