Right Triangle Maker: Construct from Angle & Side or Two Sides

Right Triangle Maker: Construct from Angle & Side or Two Sides
Loading the math board and drawing, please wait…
2016-02-17 21:50
This GeoGebra example demonstrates how to quickly construct a right triangle by entering either one acute angle and one side, or two sides directly. It allows users to flip the triangle orientation and choose which units to display. The core mathematical concepts involve right triangle relationships, the Pythagorean theorem, trigonometric functions (sine, cosine, tangent), and the derivation of missing sides or angles from given data. The construction uses GeoGebra commands such as Corner, Polygon, If, Text, and Textfield, along with numerous objects including ViewOption, ParseTest, ZoomCushion, screen corner coordinates, triangle vertices A, B, C, and side lengths a, b, c. Dynamic text fields capture user input, and conditional logic (If) determines the position of the right angle (bottom-right, bottom-left, top-right, top-left), while zoom ranges (ZoomMinY, ZoomMaxY, etc.) are automatically adjusted to fit the figure. This example is suitable for middle school to high school students learning right triangle properties, trigonometric applications, and dynamic geometry construction. It also serves as an effective classroom demonstration tool for teachers to illustrate the logical connection between given conditions and the resulting triangle.

GeoGebra Commands & Parameters

  1. Corner(2) → ScreenBottomRightCorner
  2. Corner(1) → ScreenBottomLeftCorner
  3. Corner(5) → ScreenPixelSize
  4. Polygon(A, C, B) → Triangle, b, a, c
  5. If(b ≥ a, ((b + ((2 * ZoomCushion) * b)) * ScreenPixelHeightOverPixelWidth), a + ((2 * ZoomCushion) * a)) → ZoomHeightY
  6. If((x(A) < x(C)) ∧ (y(C) < y(B)), true, false) → RightAngleIsBottomRight
  7. If((x(A) > x(C)) ∧ (y(C) < y(B)), true, false) → RightAngleIsBottomLeft
  8. If((y(C) > y(B)) ∧ (x(C) > x(A)), true, false) → RightAngleIsTopRight
  9. If((x(C) < x(A)) ∧ (y(C) > y(B)), true, false) → RightAngleIsTopLeft
  10. If(x(C) > x(A), true, false) → RightAngleIsOnRight
  11. If(y(C) > y(B), true, false) → RightAngleIsOnTop
  12. If(RightAngleIsBottomRight ∨ RightAngleIsTopLeft, Angle[C, A, B], Angle[B, A, C]) → AngleA
  13. If(RightAngleIsBottomRight ∨ RightAngleIsTopLeft, Angle[A, B, C], Angle[C, B, A]) → AngleB
  14. If(RightAngleIsBottomRight ∨ RightAngleIsTopLeft, Angle[B, C, A], Angle[A, C, B]) → AngleC
  15. Text("a") → FirstInput
  16. Text("b") → SecondInput
  17. If(FirstInput ≟ "A" ∨ FirstInput ≟ "B", true) → FirstInputIsAnAngle
  18. If(FirstInput ≟ "a" ∧ SecondInput ≟ "b" ∨ FirstInput ≟ "b" ∧ SecondInput ≟ "a", true, false) → ab
  19. If(FirstInput ≟ "b" ∧ SecondInput ≟ "c" ∨ FirstInput ≟ "c" ∧ SecondInput ≟ "b", true, false) → bc
  20. If(FirstInput ≟ "a" ∧ SecondInput ≟ "c" ∨ FirstInput ≟ "c" ∧ SecondInput ≟ "a", true, false) → ac
  21. If(FirstInput ≟ "A" ∧ SecondInput ≟ "a" ∨ FirstInput ≟ "a" ∧ SecondInput ≟ "A", true, false) → aA
  22. If(FirstInput ≟ "a" ∧ SecondInput ≟ "B" ∨ FirstInput ≟ "B" ∧ SecondInput ≟ "a", true, false) → aB
  23. If(FirstInput ≟ "b" ∧ SecondInput ≟ "A" ∨ FirstInput ≟ "A" ∧ SecondInput ≟ "b", true, false) → bA
  24. If(FirstInput ≟ "b" ∧ SecondInput ≟ "B" ∨ FirstInput ≟ "B" ∧ SecondInput ≟ "b", true, false) → bB
  25. If(FirstInput ≟ "c" ∧ SecondInput ≟ "A" ∨ FirstInput ≟ "A" ∧ SecondInput ≟ "c", true, false) → cA
  26. If(FirstInput ≟ "c" ∧ SecondInput ≟ "B" ∨ FirstInput ≟ "B" ∧ SecondInput ≟ "c", true, false) → cB
  27. If(11 ≤ ViewOption ≤ 12, true, false) → ShowAllValues
  28. Textfield(Unitstext) → UnitstextInputBox
  29. If(7 ≤ ViewOption ≤ 10, true, false) → ShowSomeVariables
  30. Corner(3) → ScreenTopRightCorner
  31. Corner(4) → ScreenTopLeftCorner
  32. If(b ≥ a, b + ((2 * ZoomCushion) * b), ((ZoomMaxY - ZoomMinY) * ScreenPixelWidthOverPixelHeight)) → ZoomWidthX
  33. If(FirstInput ≟ "A" ∨ SecondInput ≟ "A", true, false) → AIsAnInput
  34. If(FirstInput ≟ "c" ∨ SecondInput ≟ "c", true, false) → cIsAnInput
  35. If(FirstInput ≟ "b" ∨ SecondInput ≟ "b", true, false) → bIsAnInput
  36. If(FirstInput ≟ "a" ∨ SecondInput ≟ "a", true, false) → aIsAnInput
  37. If(FirstInput ≟ "B" ∨ SecondInput ≟ "B", true, false) → BIsAnInput
  38. Textfield(cVariableTextTemp) → cVariableTextInputBox
  39. Textfield(aInputText) → aInputBox
  40. Textfield(bInputText) → bInputBox
  41. Textfield(cInputText) → cInputBox
  42. If(2 < ViewOption < 5, true, false) → ShowAllVariables
  43. If(4 < ViewOption < 9, true, false) → ShowSomeValues
  44. Polygon(ScreenBottomLeftCorner, ScreenBottomRightCorner, ScreenTopRightCorner, ScreenTopLeftCorner) → MainBackground, screenbottomleftcorner, screenbottomrightcorner, screentoprightcorner, screentopleftcorner
  45. Corner(2, 1) → ConsoleBL
  46. Corner(2, 2) → ConsoleBR
  47. Corner(2, 3) → ConsoleTR
  48. Corner(2, 4) → ConsoleTL
  49. Polygon(ConsoleBL, ConsoleBR, ConsoleTR, ConsoleTL) → ConsoleBackground, consolebl, consolebr, consoletr, consoletl
  50. If(Mod[ViewOption, 2] ≟ 0, true, false) → ShowPointLabels
  51. If(9 ≤ ViewOption ≤ 10, true, false) → ShowSomeVariablesAndValues
  52. If(13 ≤ ViewOption ≤ 14, true, false) → ShowAllVariablesAndValues