Closed codingbootcampseu closed 3 years ago
Please use the sketch from the previous task.
Hints
Global variables can be created with the let keyword.
let
Global variables need to be declared outside of functions.
let canvasSize = 400; function setup() { createCanvas(canvasSize, canvasSize); }
Bonus
Also create variables for the x and y coordinates of the squares, the gutter (space between squares).
x
y
Calculate the size of the squares based on the canvas size and gutter size.
The idea is to change the appearance (dimension and spacing) of the logo only with changing single variables.
The example solution for the bonus can be found here.
Example Solution
Beispielaufgabe hat mathematischen Fehler in der Reihe Nr 4. multiplizieren ist stärker als addieren, sprich () sind überflüssig, nur die zweite beim dividieren ist wichtig
Please use the sketch from the previous task.
Hints
Global variables can be created with the
let
keyword.Global variables need to be declared outside of functions.
Bonus
Also create variables for the
x
andy
coordinates of the squares, the gutter (space between squares).Calculate the size of the squares based on the canvas size and gutter size.
The example solution for the bonus can be found here.
Example Solution