Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 2.07 KB

File metadata and controls

54 lines (44 loc) · 2.07 KB

Gear Curve

gear curve

Code:

hyperbolicTan(theta) {
    let l = pow(e, 2 * theta);
    return (l - 1) / (l + 1);
}

gear() {
    for (let theta = 0; theta < 2 * PI; theta += 0.05) {
      let r =
        this.a +
        (1 / this.b) * this.hyperbolicTan(this.b * sin(this.m * theta));
      let x = this.r * r * sin(theta);
      let y = this.r * r * cos(theta);
      this.points.push(createVector(x, y));
    }
}

Sources:

-Mathworld - Gear Curve -Hyperbolic tan function

🌄 Gallery

Krishna anklet with gear curve

Krishna anklet with gear curve
Kolam ruleset with gear curve

Kolam ruleset with gear curve
Mango leaf with gear curve

Mango leaf with gear curve
Skierpinski with gear curve

Skierpinski with gear curve