#Draw close up for isoceles.
def triAngle(option):
fig = plt.figure(figsize = (12, 9))
ax = fig.add_subplot(111, xlim = (-0.4, 20.4), ylim = (4.7, 20.3))
#Remove axes and ticks.
for side in ['bottom', 'left', 'top', 'right']:
ax.spines[side].set_visible(False)
ax.set_xticks([])
ax.set_yticks([])
#Big triangle legs.
ax.plot((0, 96/7, 3, 0),
(16, 40/7, 20, 16),
c = 'k',
lw = 2.5,
zorder = 1)
if option == 1 :
#Right triangle and mirror.
tri12 = poly([[3, 20], [0, 16], [3, 16],
[6, 16], [3, 20], [3, 16]],
ec = '#FE0500',
fc = '#FFAAA4',
lw = 2.5,
closed = False,
zorder = 2)
ax.add_patch(tri12)
tri3 = poly([[0, 16], [96/25, 328/25],
[6, 16], [0, 16]],
ec = '#FE0500',
fc = '#FFAAA4',
lw = 2.5,
zorder = 2)
ax.add_patch(tri3)
variables = [("c", (1, 18.5), 'k'),
("2a²/c", (5, 14.5), 'k'),
("2ab/c", (1, 14.5), 'k'),
("p - 2ab/c", (5, 10), 'k'),
("c", (4.5, 18.5), 'k'),
("q - c", (10.5, 10), 'k'),
("α", (2.5, 19), 'k'),
("β", (0.5, 16.25), 'k'),
("α", (3.15, 19), 'k'),
("β", (5.15, 16.25), 'k'),
("α", (0.5, 15.55), 'k'),
("β", (5.15, 15.55), 'k')]
elif option == 2 :
ax.plot((96/25, 6),
(328/25, 16),
c = 'k',
lw = 2.5,
zorder = 1)
variables = [("c", (1, 18.5), 'k'),
("2a²/c", (5, 14.5), 'k'),
("p - 2ab/c", (5, 10), 'k'),
("q - c", (10.5, 10), 'k')]
else :
variables = [("c", (1, 18.5), 'k'),
("p", (5.5, 11), 'k'),
("q", (8, 13.5), 'k'),
("2α", (2.75, 19), 'k'),
("90-2α", (10.5, 8), 'k')]
for v in variables :
plt.annotate(v[0], v[1], c = v[2], fontsize = 16)
fig.savefig("2023.04.14 Classic" + str(option) + ".png",
bbox_inches = 'tight')