xxxxxxxxxx
38
/*
----- Coding Tutorial by Patt Vira -----
Name: Bezier Curves (Perlin Noise)
Video Tutorial: https://youtu.be/uctX1P3H3xM?si=7wVuzcgAS9bobG1S
Connect with Patt: @pattvira
https://www.pattvira.com/
----------------------------------------
*/
let x1; let y1;
let x2; let y2;
let x3; let y3;
let x4; let y4;
let offset = 0;
function setup() {
createCanvas(400, 400);
}
function draw() {
// background(220);
noFill();
strokeWeight(1);
stroke(0, 50);
x1 = noise(offset + 5) * width;
y1 = noise(offset + 10) * height;
x2 = noise(offset + 15) * width;
y2 = noise(offset + 20) * height;
x3 = noise(offset + 25) * width;
y3 = noise(offset + 30) * height;
x4 = noise(offset + 35) * width;
y4 = noise(offset + 40) * height;
bezier(x1, y1, x2, y2, x3, y3, x4, y4);
offset += 0.01;
}