Skip to content

Conversation

@AronT-TLV
Copy link
Member

Summary

Adds 7 comprehensive SVG diagrams to the Triangle documentation to visually illustrate key geometric concepts. All diagrams are embedded as @raw html blocks and centered for better presentation.

Diagrams Added

  1. Triangle types by side: Equilateral, isosceles, and scalene triangles with tick marks showing equal sides
  2. Triangle types by angle: Acute, right, and obtuse triangles with angle arc markers
  3. Cevians: Median, altitude, and angle bisector with visual distinguishers
  4. Triangle centers: All four centers in one diagram:
    • Circumcenter with perpendicular bisectors and circumcircle
    • Incenter with angle bisectors and incircle
    • Centroid with medians
    • Orthocenter with altitudes
  5. Pythagorean theorem: Right triangle with squares on all three sides showing a² + b² = c²
  6. Special right triangles: 45-45-90 and 30-60-90 triangles with side ratios

Technical Details

  • All diagrams use SVG for crisp, scalable rendering
  • Centered using <div style="text-align: center;"> wrappers
  • Color coding: blue (bisectors/medians), green (tick marks), red (centers), purple (circumcircle/altitudes), orange (angle bisectors)
  • Consistent geometric positioning with proper mathematical calculations
  • Right angle indicators using L-shaped path elements
  • Labels clearly positioned for readability

Testing

  • Built documentation locally with julia --project=. docs/make.jl
  • Verified all diagrams render correctly in Documenter.jl
  • Confirmed alignment and positioning of all geometric elements

Related

Follows the same pattern established in the Quadrilateral documentation (using @raw html SVG blocks).

- Added diagram 1: Triangle types by side length (equilateral, isosceles, scalene)
  - All triangles have base at bottom
  - Equilateral has perpendicular tick marks on all three sides
  - Isosceles has double tick marks on two equal sides
  - Scalene has labeled sides a, b, c
- Added diagram 2: Triangle types by angle measure (acute, right, obtuse)
  - Acute triangle shows three 60° angles with concave arcs
  - Right triangle shows 90° angle with square symbol, two 45° angles
  - Obtuse triangle shows 120° obtuse angle and two acute angles (40°, 20°)
- All angle arcs are properly concave and touch triangle sides
- All labels are carefully positioned for clarity
- Added diagram 4: Three triangles showing different cevian types
  - Median: Blue dashed line from vertex to midpoint with equal segment marks
  - Altitude: Red dashed line perpendicular to base with right angle symbol
  - Angle bisector: Purple dashed line with equal angle arcs at vertex
- All cevians properly positioned with clear visual markers
- Updated TODO to remove completed diagram 4
- Circumcenter: perpendicular bisectors of sides meeting at center, circumcircle passing through all vertices, tick marks showing bisected sides, right angle symbols positioned inside triangle
- Incenter: angle bisectors meeting at center, incircle tangent to all sides and fitting inside triangle
- Centroid: medians from vertices to opposite midpoints converging at center, tick marks showing bisected sides
- Orthocenter: altitudes from vertices perpendicular to opposite sides intersecting at orthocenter

All four centers displayed in single 800x280 SVG with proper geometric positioning and visual markers. Updated TODO list to reflect completion.
- Right triangle with three squares showing a² + b² = c²
- Blue square on vertical leg (a²)
- Green square on horizontal leg (b²)
- Red square on hypotenuse (c²), rotated 45° to align with hypotenuse
- Formula displayed at top of diagram
- Right angle indicator at 90° corner
- Centered diagram with proper alignment of all squares
- SVG wrapped in centered div for better presentation
- Two triangles side-by-side showing the special right triangle ratios
- 45-45-90 triangle: Shows 1:1:√2 ratio with equal legs
- 30-60-90 triangle: Shows 1:√3:2 ratio
- Clear side labels (a, a√3, 2a) for both triangles
- Right angle indicators for both triangles
- Centered diagram with titles and ratio information
- Angle arc indicators commented out (too difficult to position accurately)

Completes all 7 planned diagrams for the Triangles documentation.
@AronT-TLV AronT-TLV merged commit da7401f into main Oct 26, 2025
3 checks passed
@AronT-TLV AronT-TLV deleted the feature/geometry-svg-diagrams branch October 26, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants