xxxxxxxxxx
// Arrays 1: Pre-arrays
// Sketches with minimal repetition that don't need arrays
// In this sketch we make two instances of the same thing.
// We're not using any special approaches to do it. We're just writing each one out one at a time.
// This approach is great for a couple of instances, but what if we need more instanaces? ...
// ... See next sketch.
let x1 = 10;
let x2 = 40;
function setup() {
createCanvas(240, 120);
noStroke();
}
function draw() {
background(255,140,0);
x1 += 0.5;
x2 += 0.5;
arc(x1, 30, 40, 40, 0.52, 5.76); // arc(x, y, w, h, start, stop)
arc(x2, 90, 40, 40, 0.52, 5.76);
}