Skip to content

Commit

Permalink
add references
Browse files Browse the repository at this point in the history
  • Loading branch information
kfahn22 committed Oct 13, 2024
1 parent cb19b6f commit 7f58398
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions code/Shapes-playground/shapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ class Shape {
let N = 30000;
for (let theta = 0; theta < N; theta += 1) {
let u = (theta * 21.0 * PI) / N;
console.log(u)
let r =
this.a * (5 * (1 + sin((11 * u) / 5)) -
4 * pow(sin((17 * u) / 3), 4) * pow(sin(2 * cos(3 * u) - 28 * u), 8));
this.a *
(5 * (1 + sin((11 * u) / 5)) -
4 * pow(sin((17 * u) / 3), 4) * pow(sin(2 * cos(3 * u) - 28 * u), 8));
let x = this.r * r * cos(u);
let y = this.r * r * sin(u);
this.points.push(createVector(x, y));
Expand Down Expand Up @@ -260,6 +260,7 @@ class Shape {
this.points.push(createVector(2 * this.r, 0));
}

// https://mathcurve.com/courbes2d.gb/lissajous/lissajous.shtml
// https://thecodingtrain.com/challenges/116-lissajous-curve-table

lissajous() {
Expand Down Expand Up @@ -290,6 +291,7 @@ class Shape {
}
}

// https://mathcurve.com/courbes2d.gb/rosace/rosace.shtml
// https://thecodingtrain.com/challenges/55-mathematical-rose-patterns
// https://editor.p5js.org/codingtrain/sketches/3kanFIcHd

Expand Down
4 changes: 2 additions & 2 deletions docs/POLAR-SHAPES/lissajous.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ lissajous() {
}
```

[Lissajous Curve Coding Challenge](https://thecodingtrain.com/challenges/116-lissajous-curve-table)

- [Lissajous Curve Coding Challenge](https://thecodingtrain.com/challenges/116-lissajous-curve-table)
- [Lissajous Curve or Bowditch Curve](https://mathcurve.com/courbes2d.gb/lissajous/lissajous.shtml)

## 🌄 Gallery

Expand Down
3 changes: 2 additions & 1 deletion docs/POLAR-SHAPES/rose.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ rose() {
}
```

[Mathematical Rose Coding Challenge](https://thecodingtrain.com/challenges/55-mathematical-rose-patterns)
- [Mathematical Rose Coding Challenge](https://thecodingtrain.com/challenges/55-mathematical-rose-patterns)
- [Rose](https://mathcurve.com/courbes2d.gb/rosace/rosace.shtml)

## 🌄 Gallery

Expand Down

0 comments on commit 7f58398

Please sign in to comment.