Geometries
- class PointNum(x, y)
Bases:
object
Numerical point.
- angle()
- Return type:
float
- close_enough(point)
- Return type:
bool
- distance(p)
- Return type:
float
- distance2(p)
- Return type:
float
- dot(other)
- Return type:
float
- class FormNum
Bases:
ABC
- class LineNum(p1=None, p2=None, coefficients=None)
Bases:
FormNum
Numerical line.
- same(other)
- Return type:
bool
- distance(p)
- Return type:
float
- is_parallel(other)
- Return type:
bool
- is_perp(other)
- Return type:
bool
- point_at(x=None, y=None)
Infer the point on the line by its x and/or y coordinate(s)
- Return type:
Optional
[PointNum
]
- diff_side(p1, p2)
- Return type:
bool
- same_side(p1, p2)
- Return type:
bool
- sample_within(points, *, trials=5, rng)
Sample a point within the boundary of points.
- Return type:
- angle()
- Return type:
float
- class CircleNum(center=None, radius=None, p1=None, p2=None, p3=None)
Bases:
FormNum
Numerical circle.
- exception InvalidIntersectError
Bases:
Exception
- exception InvalidReduceError
Bases:
Exception
- solve_quad(a, b, c)
Solve a x^2 + bx + c = 0.
- Return type:
tuple
[float
,...
]
- intersect(a, b)