Heron's Formula is a method for calculating the area of a triangle when the lengths of all three sides are known. This formula is attributed to Heron of Alexandria.
Download Heron Triangle Visualizer (Linux, Windows) HERE
Given the three side lengths of a triangle:
a
= first sideb
= second sidec
= third side
The semi-perimeter is half the perimeter of the triangle and is calculated as:
Step 2: Calculate the Area A
The area of the triangle is determined using the following formula:
Let the sides of the triangle be:
a = 5
b = 6
c = 7
-
Compute the semi-perimeter:
$$s = \frac{5 + 6 + 7}{2} = 9$$ -
Compute the area:
$$A = \sqrt{9(9 - 5)(9 - 6)(9 - 7)}$$ $$A = \sqrt{9 \cdot 4 \cdot 3 \cdot 2} = \sqrt{216} \approx 14.7$$
The area of the triangle is approximately 14.7 square units.
- Geometry and trigonometry problems
- Engineering and architecture
- Computational graphics and simulations
- Heron's Formula works for any triangle, as long as the sum of any two sides is greater than the third side (triangle inequality).
To learn more about Heron's formula, click here.
- Cross-platform support: Linux & Windows
- Real-time rendering with OpenGL 3.3+
- Vertex dragging
- Lightweight and optimized for performance
- MIT License: Open for contributions
- CMake (version 3.16 or higher)
- C++ Compiler with support for C++20
- Git for cloning the repository
- OpenGL 3.3+
-
Clone the repository with submodules:
git clone --recursive https://github.com/Moderrek/HeronTriangle.git cd HeronTriangle
-
Configure the project using CMake:
- For Windows
./scripts/windows_setup_project.bat
- For Linux
./scripts/linux_setup_project.sh
- For Windows
-
Build the project:
- For Windows
./scripts/windows_build_debug.bat
- For Linux
./scripts/linux_build_debug.sh
- For Windows
-
Run the game:
- On Windows: Open executable in the
build/bin
orbuild/bin
directory. - On Linux: Run executable
./build/bin/HeronTriangle
- On Windows: Open executable in the
- Ensure all dependencies are correctly installed before starting the build process.
- If you encounterr errors, consult the project's issue tracker.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
- Tymon Woźniak - Creator and Maintainer