Curve that touches three points: Difference between revisions
Content added Content deleted
Line 68: | Line 68: | ||
const p3 = Point(200, 10) |
const p3 = Point(200, 10) |
||
const allp = [p1, p2, p3] |
const allp = [p1, p2, p3] |
||
# Tests for potentially collinear points. These are NOT needed for the points above. |
|||
noncolinear(a, b) = (a.y != 0 && b.y != 0 && a.x/a.y != b.x/b.y) |
|||
noncolinear(a, b, c) = noncolinear(a, b) && noncolinear(a, c) && noncolinear(b, c) |
|||
# set up problem matrix and solve. |
# set up problem matrix and solve. |