1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-20 23:41:49 +02:00

finished molding

This commit is contained in:
Pomax
2020-09-01 15:54:50 -07:00
parent fbec463127
commit fc13f64451
84 changed files with 789 additions and 795 deletions

View File

@@ -131,7 +131,7 @@ showCurve(p1, p2, p3, c) {
// Check which length we need to use for our e1-e2 segment,
// corrected for whether B is "above" or "below" the baseline:
const angle = atan2(E.y-S.y, E.x-S.x) - atan2(B.y-S.y, B.x-S.x),
const angle = ( atan2(E.y-S.y, E.x-S.x) - atan2(B.y-S.y, B.x-S.x) + TAU ) % TAU,
bc = (angle < 0 || angle > PI ? -1 : 1) * dist(S.x, S.y, E.x, E.y)/3,
de1 = t * bc,
de2 = (1-t) * bc;