Match perp A B C D, perp E F G H, npara A B E F => eqangle A B E F C D G H.
(
g: gh.Graph,
g_matcher: Callable[str, list[tuple[gm.Point, ...]]],
theorem: pr.Theorem,
)
| 141 | |
| 142 | |
| 143 | def match_perp_perp_npara_eqangle( |
| 144 | g: gh.Graph, |
| 145 | g_matcher: Callable[str, list[tuple[gm.Point, ...]]], |
| 146 | theorem: pr.Theorem, |
| 147 | ) -> Generator[dict[str, gm.Point], None, None]: |
| 148 | """Match perp A B C D, perp E F G H, npara A B E F => eqangle A B E F C D G H.""" |
| 149 | dpairs = [] |
| 150 | for ang in g.vhalfpi.neighbors(gm.Angle): |
| 151 | d1, d2 = ang.directions |
| 152 | if d1 is None or d2 is None: |
| 153 | continue |
| 154 | dpairs.append((d1, d2)) |
| 155 | |
| 156 | for (d1, d2), (d3, d4) in utils.comb2(dpairs): |
| 157 | a, b = g.two_points_on_direction(d1) |
| 158 | c, d = g.two_points_on_direction(d2) |
| 159 | m, n = g.two_points_on_direction(d3) |
| 160 | p, q = g.two_points_on_direction(d4) |
| 161 | if g.check_npara([a, b, m, n]): |
| 162 | if ({a, b}, {c, d}) == ({m, n}, {p, q}): |
| 163 | continue |
| 164 | if ({a, b}, {c, d}) == ({p, q}, {m, n}): |
| 165 | continue |
| 166 | |
| 167 | yield dict(zip('ABCDEFGH', [a, b, c, d, m, n, p, q])) |
| 168 | |
| 169 | |
| 170 | def match_circle_coll_eqangle_midp( |
nothing calls this directly
no test coverage detected