mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-09-02 04:42:43 +02:00
bsplines
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
let curve, r;
|
||||
|
||||
setup() {
|
||||
r = (this.width/4) | 0;
|
||||
r = 100;
|
||||
curve = new Bezier(this, [
|
||||
{ x: r, y: 0 },
|
||||
{ x: r, y: 0.55228 * r },
|
||||
|
@@ -179,4 +179,4 @@ Which, in decimal values, rounded to six significant digits, is:
|
||||
|
||||
Of course, this is for a circle with radius 1, so if you have a different radius circle, simply multiply the coordinate by the radius you need. And then finally, forming a full curve is now a simple a matter of mirroring these coordinates about the origin:
|
||||
|
||||
<graphics-element title="Cubic Bézier circle approximation" width="400" height="400" src="./circle.js"></graphics-element>
|
||||
<graphics-element title="Cubic Bézier circle approximation" width="340" height="300" src="./circle.js"></graphics-element>
|
||||
|
Reference in New Issue
Block a user