Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -121,6 +121,14 @@ def plot_triangle(x1, y1, x2, y2, x3, y3, I_x, I_y, Ux, Uy, G_x, G_y, midpoints)
|
|
| 121 |
# Plot midpoints of sides
|
| 122 |
for i, (mx, my) in enumerate(midpoints):
|
| 123 |
ax.scatter(mx, my, color=midpoint_color, zorder=5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
# Add legend
|
| 126 |
handles = [
|
|
|
|
| 121 |
# Plot midpoints of sides
|
| 122 |
for i, (mx, my) in enumerate(midpoints):
|
| 123 |
ax.scatter(mx, my, color=midpoint_color, zorder=5)
|
| 124 |
+
|
| 125 |
+
# Draw the inscribed circle (incircle)
|
| 126 |
+
incircle = Circle((I_x, I_y), radius_in, color=incenter_color, fill=False, linestyle='--', linewidth=2, label="Inscribed Circle")
|
| 127 |
+
ax.add_patch(incircle)
|
| 128 |
+
|
| 129 |
+
# Draw the circumscribed circle (circumcircle)
|
| 130 |
+
circumcircle = Circle((Ux, Uy), radius_circum, color=circumcenter_color, fill=False, linestyle='--', linewidth=2, label="Circumscribed Circle")
|
| 131 |
+
ax.add_patch(circumcircle)
|
| 132 |
|
| 133 |
# Add legend
|
| 134 |
handles = [
|