Tut­o­r­i­a­l 2: Ele­m­e­n­t­s of Code

by Danielle Pontes

week 2 learning to draw

  • Show Sketch
/** @peep sketchcode */
size(300,300);
background(255,192,203); // Fill the window with black
int x=10;
int y=40;
 
strokeWeight(5); //this is an example of a function
line(x+40, y+10, 90, 90); // Draw a diagonal line across the window
strokeWeight(2);
triangle(x+30,y-30,x+30,y,x,y);
noFill();
bezier(100,100,200,70,200,200,100,170);
println("Hello World");
 
fill(0);
 
quad(173, 225, 190, 215,202, 240, 180, 240);
quad(200, 210, 220, 198,240, 240, 215, 240);
quad(230, 192, 250, 181,278, 240, 253, 240);

Comments

Nobody has said anything yet.