(a: Arc, p: Point)
| 209 | |
| 210 | |
| 211 | def arc_pt(a: Arc, p: Point) -> Tuple[float, Segment]: |
| 212 | |
| 213 | x, y = p.x, p.y |
| 214 | x1, y1, x2, y2 = _pt_arc(p, a) |
| 215 | |
| 216 | angles = atan2p(x - x1, y - y1), atan2p(x - x2, y - y2) |
| 217 | points = Point(x1, y1), Point(x2, y2) |
| 218 | |
| 219 | ix = int(argmax(angles)) |
| 220 | |
| 221 | return angles[ix], Segment(points[ix], p) |
| 222 | |
| 223 | |
| 224 | def arc_arc(a1: Arc, a2: Arc) -> Tuple[float, Segment]: |