Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Creative Coding/Trajectory

From I/M/D Wiki
Revision as of 16:21, 22 September 2025 by Leo (talk | contribs) (Created page with "Do you know... == Class #01 == === Interface === * how to open P5 * how to save and share a P5 sketch * how to upload it in Excalidraw === Functions (beginner) === * the difference between <code>setup()</code> and <code>draw()</code> * how to use [https://p5js.org/reference/#Shape shape functions] * how to use [https://p5js.org/reference/#Setting color functions] === Variables (beginner) === * how to use an ''environment variable'' (e.g. <code>width</code>, <code>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Do you know...

Class #01

Interface

  • how to open P5
  • how to save and share a P5 sketch
  • how to upload it in Excalidraw

Functions (beginner)

Variables (beginner)

  • how to use an environment variable (e.g. width, height, mouseX, mouseY, frameCount, etc)
  • how to declare a variable (e.g. let x = 0)
  • how to change a variable using an operator (e.g. x++, x = x - 2, x = mouseX, etc)
  • how to use variables as arguments of a function (e.g. circle(mouseX, mouseY, s) )

Dynamic Portrait

  • how to use the previous concepts to make a dynamic portrait

Class #02

Functions (medium)

Variables (medium)

Conditions

  • how to write an if statement
    if(mouseIsPressed == true){
        background('red');
    }
    
  • how to write an if-else statement
    if(mouseIsPressed == true){
        background('red');
    } else {
        background('blue');
    }
    
  • how to use booleans (mouseIsPressed, mouseIsClicked, anything that returns true/false)
  • how to