Thursday

Today we are going to quickly learn about looping and then spend the day on a contest between the study groups

The contest consists of two rounds: Sketching and guessing

Loop

stroke('red');
strokeWeight(10);
for(let i = 0; i < 3; i++) {
  point(i * 100, i * 100);
}

Peer instruction

  1. First answer the question and write down the question

  2. Discuss with the person sitting next to you 1 minute

  3. Now answer again

  4. Discussion on class if necessary

Question 1 - 2 minutes no speaking

What letter will the following code draw?

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  line(100, 0, 200, 200);
  line(0, 200, 100, 0);
  line(50, 100, 150, 100);
}
  1. V

  2. Y

  3. A

  4. Z

  5. Syntax error

Question 2 - 1 minutes

What will be drawn with the following code?

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  Circle(10, 20, 30);
}
  1. A circle with radius of 10 and center in (20, 30)

  2. A circle with center in (10, 20) with diameter of 30

  3. A circle with center in (10, 20) with radius of 10

  4. A circle with radius of 30 and center in (10, 20)

  5. Syntax error

Round 1: Sketching in study groups

  • Each study group are assigned a category

  • The study group will create a sketch of that category in P5

  • The study group will be handing in their code to: nifr@kea.dk

    • Deadline: Thursday 25/8 10:45

    • WRITE YOUR GROUP NAME + CATEGORY IN THE MAIL

Round 2: Guessing

  • All code is made available to the class under the names names of Sketch 1, Sketch 2, etc.

  • It is now up to every group to make qualified guesses on what sketch represents what category

  • Hand-in: A category & sketch pairing i.e

    • Sketch 1: Psychedelic

    • Sketch 2: Being in the zone

    • etc.

  • Deadline: Thursday 26/8 11:30

We will be meeting again 11:35

Rules

It is not allowed to use text directly such as writing "Harry potter" to the console

It is not allowed to draw letters using shapes & lines

It is encouraged to think outside of the box !

There are two winning categories:

  • Best guessers

  • Best sketchers

📣The winners will be announced Friday and will receive a beautiful prize 🥇

Categories

  • Excited

  • Psychedelic

  • Surprise

  • Shocked

  • Weird

  • Spooked

  • Bewildered

  • Moved

  • Otherworldly

  • Awe-inspiring

  • Dreamlike

Number
Link

1

https://editor.p5js.org/Mahe0055/sketches/Q_MwTlf9E

2

https://editor.p5js.org/madsen10/sketches/XhVsEIGJb

3

https://editor.p5js.org/denizokumus52/sketches/_EohGBNM6 https://editor.p5js.org/denizokumus52/sketches/Nj_cTHj5Q

4

https://editor.p5js.org/gust9196/sketches/SYmzhEpEa

5

https://editor.p5js.org/Hans867/sketches/5XpELwpE5t

6

https://editor.p5js.org/frederikvera/sketches/CIWC-4tYK

7

https://editor.p5js.org/davoquavowavo/sketches/iDGMVTGZ9

8

https://editor.p5js.org/Jeppneu123/full/rxRj3U91j

Last updated