Why points are collinear.
(
points: list[Point], level: int = None
)
| 427 | |
| 428 | |
| 429 | def line_of_and_why( |
| 430 | points: list[Point], level: int = None |
| 431 | ) -> tuple[Line, list[Any]]: |
| 432 | """Why points are collinear.""" |
| 433 | for l0 in get_lines_thru_all(*points): |
| 434 | for l in l0.equivs(): |
| 435 | if all([p in l.edge_graph for p in points]): |
| 436 | x, y = l.points |
| 437 | colls = list({x, y} | set(points)) |
| 438 | # if len(colls) < 3: |
| 439 | # return l, [] |
| 440 | why = l.why_coll(colls, level) |
| 441 | if why is not None: |
| 442 | return l, why |
| 443 | |
| 444 | return None, None |
| 445 | |
| 446 | |
| 447 | def get_circles_thru_all(*points: list[Point]) -> list[Circle]: |
nothing calls this directly
no test coverage detected