{"id":22438543,"url":"https://github.com/moderrek/herontriangle","last_synced_at":"2026-01-31T03:31:50.863Z","repository":{"id":266556112,"uuid":"895198804","full_name":"Moderrek/HeronTriangle","owner":"Moderrek","description":"A Modern C++ project to calculate and visualize triangles using Heron's Formula, offering an intuitive GUI powered by ImGui and OpenGL.","archived":false,"fork":false,"pushed_at":"2024-12-08T22:33:19.000Z","size":512,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T09:19:33.583Z","etag":null,"topics":["area-calculation","cmake","cplusplus","cpp","geometry","graphics-programming","gui","herons-formula","imgui","interactive-math","math","modern-cpp","real-time-graphics","triangle","triangle-visualization"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Moderrek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-27T18:34:05.000Z","updated_at":"2024-12-09T08:20:12.000Z","dependencies_parsed_at":"2024-12-04T21:37:16.990Z","dependency_job_id":"9b385a4d-67e4-49e8-b86a-485be67e8ee7","html_url":"https://github.com/Moderrek/HeronTriangle","commit_stats":null,"previous_names":["moderrek/herontriangle"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderrek%2FHeronTriangle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderrek%2FHeronTriangle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderrek%2FHeronTriangle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moderrek%2FHeronTriangle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moderrek","download_url":"https://codeload.github.com/Moderrek/HeronTriangle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248761906,"owners_count":21157637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["area-calculation","cmake","cplusplus","cpp","geometry","graphics-programming","gui","herons-formula","imgui","interactive-math","math","modern-cpp","real-time-graphics","triangle","triangle-visualization"],"created_at":"2024-12-06T01:10:33.923Z","updated_at":"2026-01-31T03:31:50.833Z","avatar_url":"https://github.com/Moderrek.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heron Triangle\n\n![Linux](https://img.shields.io/badge/Platform-Linux-blue?logo=linux)\n![Windows](https://img.shields.io/badge/Platform-Windows-blue?logo=windows)\n![OpenGL](https://img.shields.io/badge/Graphics-OpenGL-green?logo=opengl)\n![MIT License](https://img.shields.io/badge/License-MIT-yellow?logo=opensourceinitiative)\n![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/Moderrek/HeronTriangle/total)\n\n[Heron's Formula](https://en.wikipedia.org/wiki/Heron%27s_formula) is a method for calculating the **area** of a [triangle](https://en.wikipedia.org/wiki/Triangle) when the lengths of all three sides are known. This formula is attributed to **Heron of Alexandria**.\n\n\n[**Download Heron Triangle Visualizer (Linux, Windows) HERE**](https://github.com/Moderrek/HeronTriangle/releases)\n\n\n![image](https://github.com/user-attachments/assets/98017984-4fcb-499d-aae1-badc98fa7711)\n\n---\n\n## Formula Overview\n\nGiven the three side lengths of a [triangle](https://en.wikipedia.org/wiki/Triangle):\n\n- ***`a`*** = first side\n- ***`b`*** = second side\n- ***`c`*** = third side\n\n### Step 1: Calculate the Semi-Perimeter ***`s`***\n\nThe [semi-perimeter](https://en.wikipedia.org/wiki/Semiperimeter) is half the [perimeter](https://en.wikipedia.org/wiki/Perimeter) of the [triangle](https://en.wikipedia.org/wiki/Triangle) and is calculated as:\n\n```math\ns = \\frac{a + b + c}{2}\n```\n\n### Step 2: Calculate the [Area](https://en.wikipedia.org/wiki/Area) ***`A`***\n\nThe area of the triangle is determined using the following formula:\n\n```math\nA = \\sqrt{s(s - a)(s - b)(s - c)}\n```\n\n---\n\n## Example\n\n### Input:\nLet the sides of the triangle be:\n\n- `a = 5`\n- `b = 6`\n- `c = 7`\n\n### Calculation:\n1. Compute the [semi-perimeter](https://en.wikipedia.org/wiki/Semiperimeter):\n   ```math\n   s = \\frac{5 + 6 + 7}{2} = 9\n   ```\n\n2. Compute the area:\n   ```math\n   A = \\sqrt{9(9 - 5)(9 - 6)(9 - 7)}\n   ```\n   ```math\n   A = \\sqrt{9 \\cdot 4 \\cdot 3 \\cdot 2} = \\sqrt{216} \\approx 14.7\n   ```\n\n### Output:\nThe area of the triangle is approximately **14.7 square units**.\n\n---\n\n## Applications\n\n- [Geometry](https://en.wikipedia.org/wiki/Geometry) and [trigonometry](https://en.wikipedia.org/wiki/Trigonometry) problems\n- Engineering and architecture\n- Computational graphics and simulations\n- Heron's Formula works for any triangle, as long as the sum of any two sides is greater than the third side ([triangle inequality](https://en.wikipedia.org/wiki/Triangle_inequality)).\n\nTo learn more about Heron's formula, [click here](https://en.wikipedia.org/wiki/Heron%27s_formula).\n\n## Table of Contents\n- [Heron Triangle](#heron-triangle)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [How to Compile](#how-to-compile)\n    - [Requirements](#requirements)\n    - [Steps to Compile](#steps-to-compile)\n  - [Notes](#notes)\n  - [License](#license)\n  - [Contributing](#contributing)\n  - [Authors](#authors)\n\n## Features\n* Cross-platform support: Linux \u0026 Windows\n* Real-time rendering with OpenGL 3.3+\n* Vertex dragging\n* Lightweight and optimized for performance\n* MIT License: Open for contributions\n\n## How to Compile\n\n### Requirements\n- **CMake** (version 3.16 or higher)\n- **C++ Compiler** with support for C++20\n- **Git** for cloning the repository\n- **OpenGL 3.3+**\n\n### Steps to Compile\n\n1. Clone the repository with submodules:\n   ```bash\n   git clone --recursive https://github.com/Moderrek/HeronTriangle.git\n   cd HeronTriangle\n   ```\n\n3. Configure the project using **CMake**:  \n   * For **Windows**\n     ```bash\n     ./scripts/windows_setup_project.bat\n     ```\n   * For **Linux**\n     ```bash\n     ./scripts/linux_setup_project.sh\n     ```\n\n4. Build the project:  \n   * For **Windows**\n     ```bash\n     ./scripts/windows_build_debug.bat\n     ```\n   *  For **Linux**\n      ```bash\n      ./scripts/linux_build_debug.sh\n      ```\n\n5. Run the game:\n   * On **Windows**: Open executable in the `build/bin` or `build/bin` directory.\n   * On **Linux**: Run executable \n     ```bash\n     ./build/bin/HeronTriangle\n     ```\n\n## Notes\n* Ensure all dependencies are correctly installed before starting the build process.\n* If you encounterr errors, consult the project's issue tracker.\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\nContributions 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.\n\n\n## Authors\n- Tymon Woźniak - Creator and Maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderrek%2Fherontriangle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoderrek%2Fherontriangle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderrek%2Fherontriangle/lists"}