Mario-Code-Day1

 

//Day_1_Homework_Program_1
//Mario_Dcunha

//Define Center Points
int x=0, y=0;

void setup()
{
size(1000,400);
smooth();
background(243,237,177);
}

void draw()
{
noStroke();
//Taking a center for concentric circles
pick_center(150,150);

//Drawing the white concentric circles
circle(255,255,255, 160);

//Insert the white cirlce behind
stroke(0); strokeWeight(2);
pick_center(100,230);
circle(255,255,255,60);

noStroke();
pick_center(150,150);
circle(0,0,0, 150);
circle(32,78,105, 90);
circle(0,0,0,75);
circle(59,131,119,60);
circle(0,0,0,50);

//Draw the final black loop
//pick_center(150,150);
noFill(); stroke(0); strokeWeight(5);
ellipse(150, 150, 165, 165);

noStroke();
pick_center(360,237);
circle(0,0,0,60);
circle(235,208,118,50);
circle(255,255,255,40);
//rotate(radians(45));
//arc(340,200,80,80,0,PI);
//rotate(0);
stroke(0); strokeWeight(2);
line(180, 260, 500, 160);
line(320, 100, 400, 350);

/*noStroke();
pick_center(350,227);
circle(0,0,0,60);
circle(235,208,118,50);
circle(255,255,255,40); */

//Rectangle Thing

pushMatrix(); // Store the current transformation settings.
translate(800,150);
rotate(-PI/4.0);

fill(197,70,42);
rect(0,0,80,80);
fill(232,151,114);
rect(40,0,40,40);
rect(0,40,40,40);
fill(0);
rect(40,40,40,40);

strokeWeight(2);
line(0, 0, -80, 40);
line(0, 20, -80, 40);
line(0, 40, -80, 40);
line(0, 60, -80, 40);
line(0, 80, -80, 40);

noStroke();
fill(197,70,42);
triangle(-80, 40, -20, 200, -65, 120);

popMatrix(); // Restore the previous transformation settings.

}

void circle(int r, int g, int b, int diameter)
{
fill(r, g, b);
ellipse(x, y, diameter, diameter);
}

void pick_center(int center_x, int center_y)
{
x = center_x;
y = center_y;
}