$\textsf{NEW TRIANGLE}$

\textsf{Use the magnifying glass to discover the names of the sides of the triangles.}

allRandomSeeds = RandomUniform(0, 0.99, 200)
AppSize = Corner(5)
numRandoms: 8
countQuestion = 0
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
MoveGuideLine = (-1.68, 2.86)
hGuideline: y = y(MoveGuideLine)
vGuideline: x = x(MoveGuideLine)
Cor1 = (-2.0199999999999996, -1.4399999999999964)
Cor3 = (14.019999999999992, 8.599999999999998)
vertices: {{(1.5, 5.5), (1.5, 1.5), (6.5, 1.5)}, {(1.5, 5.5), (1.5, 1.5), (4.5, 1.5)}, {(1.5, 4), (4, 1.5), (6.5, 4)}, {(1.5, 4), (6.5, 1.5), (6.5, 4)}, {(3.5, 1.5), (6.5, 1.5), (6.5, 4)}, {(1.5, 1.5), (7.5, 1.5), (4.5, 4.5)}, {(1.5, 1.5), (7.5, 1.5), (5.5, 5.5)}, {(1.5, 1.5), (4, 1.5), (5.5, 5.5)}, {(3, 1.5), (7.5, 3), (4, 5)}}
index1: floor((currentRandomSeeds(1) * Length[vertices])) + 1
currentExample: vertices(index1)
t1 = Polygon(currentExample)
α, β, γ = InteriorAngles(t1)
labels: {{"A", "B", "C"}, {"P", "Q", "R"}, {"X", "Y", "Z"}}
index2: floor((currentRandomSeeds(2) * Length[labels])) + 1
currentLabels = Element(labels, index2)
CentTri = Centroid(t1)
text1 = Text(currentLabels(1), Vertex[t1, 1], true, true, 0, If[y(Vertex[t1, 1]) ≥ y(CentTri), 1, -1])
text2 = Text(currentLabels(2), Vertex[t1, 2], true, true, 0, If[y(Vertex[t1, 2]) ≥ y(CentTri), 1, -1])
text3 = Text(currentLabels(3), Vertex[t1, 3], true, true, 0, If[y(Vertex[t1, 3]) ≥ y(CentTri), 1, -1])
right = IndexOf(90°, {α, β, γ})
posIndex3: Sequence[3] \ {right}
index3: floor((currentRandomSeeds(3) * Length[posIndex3])) + 1
chosenAngle = Element(Zip[currentLabels(kk), kk, posIndex3], index3)
seg12 = Segment(Vertex[t1, 1], Vertex[t1, 2])
seg23 = Segment(Vertex[t1, 2], Vertex[t1, 3])
seg31 = Segment(Vertex[t1, 3], Vertex[t1, 1])
captionSeg12 = If(Defined[right] ∧ γ ≟ 90°, "Hypotenuse", If[chosenAngle ≟ Element[currentLabels, 3], ("Opposite Side to Angle " * chosenAngle), ("Adjacent Side to Angle " * chosenAngle)])
captionSeg23 = If(Defined[right] ∧ α ≟ 90°, "Hypotenuse", If[chosenAngle ≟ Element[currentLabels, 1], ("Opposite Side to Angle " * chosenAngle), ("Adjacent Side to Angle " * chosenAngle)])
captionSeg31 = If(Defined[right] ∧ β ≟ 90°, "Hypotenuse", If[chosenAngle ≟ Element[currentLabels, 2], ("Opposite Side to Angle " * chosenAngle), ("Adjacent Side to Angle " * chosenAngle)])
A = (8.96784, 1.8012)
B: A + (4, 0)
Midpoints = Zip(Midpoint[seg], seg, {seg12, seg23, seg31})
fac: 3 / 7
u = Vector(A, Intersect[Circle[A, (Distance[A, B] * fac)], Segment[A, B]])
v = Vector(A, A + (1.35 * Rotate[u, 90°, A]))
C: A + u + v
c = Circle(C, 1)
l1 = KeepIf(IsInRegion[PP, c], PP, Midpoints)
minDist = Min(Zip[Distance[PP, C], PP, l1])
l2 = Zip(Distance[PP, C], PP, Midpoints)
highlight = IndexOf(minDist, l2)
text4: "\textsf{" + (LaTeX[Element[{captionSeg12, captionSeg23, captionSeg31}, highlight]]) + "}"
text5 = Text(text4, (10.5, 6), true, true, 0, 0)
highlihgColor: {224, 116, 21}
AHome = (8.96784, 1.8012)
BHome = (13.46784, 1.8012)
tabOrder: {textQuestion, pic1, btnNew}
seg31HL_{1} = Segment(Intersect[c, seg31, 1], Intersect[c, seg31, 2])
seg31HL = Segment(Intersect[c, seg12, 1], Intersect[c, seg12, 2])
seg23HL = Segment(Intersect[c, seg23, 1], Intersect[c, seg23, 2])