MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / draw_circle

Function draw_circle

numericals.py:1015–1030  ·  view source on GitHub ↗

Draw a circle.

(
    ax: matplotlib.axes.Axes, circle: Circle, color: Any = 'cyan'
)

Source from the content-addressed store, hash-verified

1013
1014
1015def draw_circle(
1016 ax: matplotlib.axes.Axes, circle: Circle, color: Any = 'cyan'
1017) -> Circle:
1018 """Draw a circle."""
1019 if circle.num is not None:
1020 circle = circle.num
1021 else:
1022 points = circle.neighbors(gm.Point)
1023 if len(points) <= 2:
1024 return
1025 points = [p.num for p in points]
1026 p1, p2, p3 = points[:3]
1027 circle = Circle(p1=p1, p2=p2, p3=p3)
1028
1029 _draw_circle(ax, circle, color)
1030 return circle
1031
1032
1033def mark_segment(

Callers 1

_drawFunction · 0.85

Calls 3

_draw_circleFunction · 0.85
neighborsMethod · 0.80
CircleClass · 0.70

Tested by

no test coverage detected