Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
floodfx committed Jan 5, 2022
1 parent 4bdc4ea commit a96c5f0
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/sketches/genuary2022/jan4/fidenzav2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function sketch(p: p5) {
const grid: Array<Array<number>> = [];

function generateGridOfAngles() {

for (let col = 0; col < num_columns; col++) {
grid[col] = [];
for (let row = 0; row < num_rows; row++) {
Expand All @@ -45,11 +44,11 @@ function sketch(p: p5) {
const step_size = 20;
p.noFill();
// p.fill(0, 0, 0, 0.02);
p.colorMode(p.RGB)
p.strokeWeight(p.round(p.random(5,25)));
p.colorMode(p.RGB);
p.strokeWeight(p.round(p.random(5, 25)));
p.strokeCap(p.SQUARE);
p.stroke(color);

p.beginShape();
for (let n = 0; n < num_steps; n++) {
p.vertex(x, y);
Expand All @@ -70,7 +69,6 @@ function sketch(p: p5) {
let y_step = step_size * p.sin(grid_angle);
x = x + x_step;
y = y + y_step;

}
p.endShape();
}
Expand All @@ -94,29 +92,30 @@ function sketch(p: p5) {
p.createCanvas(width, height);
p.background("#FFFBDB");
p.colorMode("hsb", 360, 100, 100);


const colors = chroma.scale(["F9D371", "8843F2"]).mode("lch").colors(8);

const colors = chroma
.scale(["F9D371", "8843F2"])
.mode("lch")
.colors(8);

// p.noiseSeed(20220104);
// p.randomSeed(20220104);
// generate the grid of angles
generateGridOfAngles();

// draw curves
for (var i = 0; i < p.round(p.random(100,200)); i++) {
drawCurve(p.random(-500, 1500), p.random(-500, 1500), 20, colors[p.round(p.random(0,7))]);
// draw curves
for (var i = 0; i < p.round(p.random(100, 200)); i++) {
drawCurve(p.random(-500, 1500), p.random(-500, 1500), 20, colors[p.round(p.random(0, 7))]);
}

// p.noiseSeed(202201042);
// p.randomSeed(202201042);

generateGridOfAngles();

// draw curves
for (var i = 0; i < p.round(p.random(100,200)); i++) {
drawCurve(p.random(-500, 1500), p.random(-500, 1500), 20, colors[p.round(p.random(0,7))]);
// draw curves
for (var i = 0; i < p.round(p.random(100, 200)); i++) {
drawCurve(p.random(-500, 1500), p.random(-500, 1500), 20, colors[p.round(p.random(0, 7))]);
}
};

Expand Down

0 comments on commit a96c5f0

Please sign in to comment.