Day 2 – Shapes: Processing

Vocabulary

  • Coordinates – X and Y are respectively the horizontal and vertical addresses of any pixel on a screen
  • Fill – color inside a shape
  • RGB – Red, Green, Blue
  • Shapes – ellipse and rect in Processing
  • Stroke – color on outline of shape

Coding Shapes

void setup() {
size(500,400);
}

void draw() {
stroke(255, 255, 255);
fill(255, 110, 90);
ellipse(250, 200, 300, 300);

rect(245, 40, 10, 240);

ellipse(190, 200, 70, 70);

ellipse(190, 100, 70, 70);
}

Hints

  • fill (R, G, B)
  • ellipse (X, Y, width, height)

Instructions

  • Copy code above and paste into Sketch Playground.
  • Change mode from P5js to Processing.js.
  • Select Run.
  • Rearrange objects to make a face.
  • Update colors of objects.
  • Take a screenshot.
  • On your Padlet share screenshot & reflect: What did you enjoy about activity? What did you find challenging?

Leave a Reply

Your email address will not be published. Required fields are marked *