1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-03 05:12:43 +02:00

this rename is absolutely stupid

This commit is contained in:
Pomax
2020-08-20 13:01:32 -07:00
parent 59fdafb2c5
commit d92e370bd1
470 changed files with 22 additions and 9 deletions

View File

@@ -0,0 +1,30 @@
let curve;
setup() {
curve = new Bezier(this, 90, 200, 25, 100, 220, 40, 210, 240);
setMovable(curve.points);
}
draw() {
clear();
curve.drawSkeleton();
curve.drawCurve();
setStroke("rgb(200,100,100)");
let dim = this.height;
let t = this.cursor.x / dim;
curve.drawStruts(t);
curve.drawPoints();
let p = curve.get(t);
circle(p.x, p.y, 5);
let perc = (t*100)|0;
t = perc/100;
text(`Sequential interpolation for ${perc}% (t=${t})`, 10, 15);
}
onMouseMove() {
redraw();
}