Skip to content

Commit 5765b4f

Browse files
Pot ilustration
1 parent c3b1dbb commit 5765b4f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Breziers/p5/empty-example/sketch.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function brezier(Q, x1, y1, x2, y2, x3, y3, x4, y4) {
7070

7171
function makeShape(coordx, coordy) {
7272

73-
stroke(255);
73+
stroke(random(0, 255), random(0, 255), random(0, 255));
7474
noFill();
7575
beginShape();
7676
for (let i = 0; i < coordx.length; i++) {
@@ -89,10 +89,22 @@ function setup() {
8989

9090
}
9191

92+
function opp(x) {
93+
let k = width / 2 - x;
94+
return width / 2 + k;
95+
}
9296

9397
function draw() {
9498

9599
background(51);
96-
brezier(0.01, 0, 600, 300, 600, 300, 0, mouseX, mouseY);
97100

101+
102+
brezier(0.01, 216, 157, 382, 334, 105, 288, 245, 455);
103+
brezier(0.01, opp(216), 157, opp(382), 334, opp(105), 288, opp(245), 455);
104+
brezier(0.01, 216, 153, 256, 174, 362, 166, 382, 155);
105+
brezier(0.01, 216, 153, 256, 174, 362, 166, 382, 155);
106+
brezier(0.01, 216, 153, 251, 129, 367, 137, 382, 155);
107+
brezier(0.01, 240, 449, 270, 466, 336, 466, 360, 450);
108+
109+
frameRate(0);
98110
}

0 commit comments

Comments
 (0)