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

full regeneration

This commit is contained in:
Pomax
2020-09-19 18:34:03 -07:00
parent ad872f83c5
commit 4c0e71cd4a
234 changed files with 1468 additions and 1376 deletions

View File

@@ -12,11 +12,13 @@ draw() {
curve.drawCurve();
curve.drawPoints();
// Similar to aligning, we transform the curve first
let translated = this.translatePoints(curve.points);
let rotated = this.rotatePoints(translated);
let rtcurve = new Bezier(this, rotated);
let extrema = rtcurve.extrema();
// and the we run the regular bounding box code
let minx = Number.MAX_SAFE_INTEGER,
miny = minx,
maxx = Number.MIN_SAFE_INTEGER,
@@ -37,6 +39,8 @@ draw() {
noFill();
setStroke(`#0F0`);
// But, crucially, we now need to reverse-transform the bbox corners:
let tx = curve.points[0].x;
let ty = curve.points[0].y;
let a = rotated[0].a;