# Plane Geometry Diagrams With Labels

I can make some basic diagrams in Mathematica (stolen from their pages, for example see the below:

 LaminaData["FilledIsoscelesTriangle", "Diagram"]


However, I'm trying to make a simple, set of labelled diagrams, similar to this one, with certain angles marked, etc. Is there a tutorial anywhere that explains how to do this please?

• Hi, welcome to Mathematica.SE, please consider taking the tour so you learn the basic of the site. Once you gain enough reputation by making good questions you will be able to vote up and down both questions and answers. When you see good ones, please vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. As you receive help, try to give it too, by answering questions in your area of expertise. Oct 19, 2014 at 12:38
• You may want to look into AASTriangle and all the *Trainglefamily of functions. Oct 19, 2014 at 12:39
• Thanks rhermans. However, I don't see any options on how to label angles or sides in AASTriangle, is there another reference I am missing? Oct 19, 2014 at 12:54
• Oct 19, 2014 at 18:15

For simple graphics just build them step-by-step from graphics primitives.

Graphics[{
(* triangle *)
Line[{{0, 0}, {0, 1}, {1, 0}, {0, 0}}],
(* right angle symbol *)
Line[{{0, 0.1}, {0.1, 0.1}, {0.1, 0}}],
(* angle symbol *)
Circle[{1, 0}, 0.2, {127.5 Degree, 187.5 Degree}],
(* labels *)
Rotate[
Text[Style["opposite side (= y)", 20],
{-0.1, 0.5}], 90 Degree],
{0.5, -0.1}],
Text[Style["hypotenuse (= z)", 20],
{0.6, 0.5}, {-1, 0}],
Text[Style["θ", 20], {0.75, 0.08}]
}]


@BobHanlon answer is an amazing replication. I post this to illustrate customizability:

trn[a_, s_] :=
Module[{tr = AASTriangle[Pi/2, a, s], sd, s1, s2, s3, txt, ang, dis},
sd = {s1, s2, s3} =
SortBy[Subsets[tr[[1]], {2}], N[EuclideanDistance @@ #] &];
ang = First@Cases[tr[[1]], {_?(#1 != 0 &), 0}];
dis = 0.2 {#, #} &@(EuclideanDistance @@ s1);
Text[Style[#1, 20], Total@#2/2, #3]} &, {{"adjacent side (= x)",
Rotate["opposite side (=y)", Pi/2],
Rotate["hypotenuse (=z)", -a]},
sd, {{0, 2}, {2, 0}, {-0.4, -0.4}}}];
Graphics[{White, EdgeForm[Black], tr,
Rectangle[{0, 0}, dis], {Black,
Circle[ang, dis, {Pi, Pi - a}]}, {Black,
Text[Style["\[Theta]",
20], (1.2 dis {Cos[Pi - a/2], Sin[Pi - a/2]} + ang)]}, txt}]
]


Note of angle

Manipulate[trn[an, 2], {an, Pi/3.9, Pi/3}]


• FYI, Text has a 4th argument that specifies direction (so that Rotate might be avoided). Oct 19, 2014 at 19:48
• @MichaelE2 thank you...always learning...had never used it, guess I didn't look at documentation closely enough Oct 19, 2014 at 23:20
• You're welcome. I used it here to make text follow a parametric curve. Oct 19, 2014 at 23:26