1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-30 19:50:01 +02:00

regenerated all images

This commit is contained in:
Pomax
2020-09-06 17:23:52 -07:00
parent 17c50a403b
commit 42b9818441
66 changed files with 407 additions and 328 deletions

View File

@@ -24,4 +24,4 @@ This makes the interval we check smaller and smaller at each iteration, and we c
So, let's see that in action: in this case, I'm going to arbitrarily say that if we're going to run the loop until the interval is smaller than 0.001, and show you what that means for projecting your mouse cursor or finger tip onto a rather complex Bézier curve (which, of course, you can reshape as you like). Also shown are the original three points that our coarse check finds.
<graphics-element title="Projecting a point onto a Bézier curve" width="320" height="320" src="./project.js"></graphics-element>
<graphics-element title="Projecting a point onto a Bézier curve" width="400" height="400" src="./project.js"></graphics-element>

View File

@@ -2,16 +2,16 @@ let curve;
setup() {
curve = new Bezier(this, [
{x:248,y:188},
{x:218,y:294},
{x:45,y:290},
{x:12,y:236},
{x:14,y:82},
{x:186,y:177},
{x:221,y:90},
{x:18,y:156},
{x:34,y:57},
{x:198,y:18}
{x:288,y:218},
{x:258,y:334},
{x:85,y:330},
{x:52,y:276},
{x:54,y:122},
{x:216,y:217},
{x:261,y:130},
{x:58,y:196},
{x:84,y:97},
{x:238,y:58}
]);
this.cursor.x = 280;