Week 2

by Jingyi Tang
  • Show Sketch
/** @peep sketchcode */
//free draw using lines, rectangles, triangles, and circle.
size(400,400);          
background(10,150,240);      //skyblue
 
beginShape();
 
int x=200;                   //start at the middle of left side.
int y=200;
noFill();
strokeWeight(0.5);
rect(x-10,y-10,20,20);       //rec 1
strokeWeight(1);
rect(x-20,y-20,40,40);       //rec 2
strokeWeight(2);
rect(x-30,y-30,60,60);       //rec 3
strokeWeight(3);
rect(x-40,y-40,80,80);       //rec 4
strokeWeight(4);
rect(x-50,y-50,100,100);     //rec 5
 
strokeWeight(4);
triangle(x-50,y+50,x+50,y+50,x,y+150);    //triangle at bottom
 
strokeWeight(0.5);
line(x-195,y-195,x+195,y+195);
line(x+50,y-50,x-50,y+50);
 
bezier(x+50,y+50,x+190,y+100,x+100,y+190,x+195,y+195);
bezier(x-50,y+50,x-190,y+100,x-100,y+190,x-195,y+195);
bezier(x+50,y-50,x+190,y-100,x+100,y-190,x+195,y-195);
bezier(x-50,y-50,x-190,y-100,x-100,y-190,x-195,y-195);
 
strokeWeight(4);
ellipse(x,y-100,100,100);
 
endShape();

Comments

    Jingyi Tang a few years ago

    Week 2 Tutorial in class.

    Last Updated: 9-Mar-2016 12:55 PM