{"id":23879521,"url":"https://github.com/tolisz/simulation_pr2","last_synced_at":"2026-04-18T13:31:37.935Z","repository":{"id":270895764,"uuid":"886791758","full_name":"Tolisz/Simulation_PR2","owner":"Tolisz","description":"Spinning Top Simulator","archived":false,"fork":false,"pushed_at":"2025-01-03T21:06:53.000Z","size":5150,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T23:28:49.178Z","etag":null,"topics":["cpp20","opengl","simulation"],"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/Tolisz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11T16:01:16.000Z","updated_at":"2025-01-04T22:33:01.000Z","dependencies_parsed_at":"2025-01-03T21:39:25.346Z","dependency_job_id":null,"html_url":"https://github.com/Tolisz/Simulation_PR2","commit_stats":null,"previous_names":["tolisz/simulation_pr2"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Tolisz/Simulation_PR2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tolisz","download_url":"https://codeload.github.com/Tolisz/Simulation_PR2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270109377,"owners_count":24528789,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpp20","opengl","simulation"],"created_at":"2025-01-03T23:17:33.253Z","updated_at":"2026-04-18T13:31:37.894Z","avatar_url":"https://github.com/Tolisz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Spinning Top Simulator\r\n\r\n![Spinning Top](/docs/SpinningTop.png)\r\n\r\nhttps://github.com/user-attachments/assets/da728654-1424-4829-ac30-96f00d14a6b2\r\n\r\n## About project \r\n\r\nThis is the second project created during *\"Physical simulations in a virtual environment\"* course, specialty **CAD/CAM systems design** of degree in *Computer Science and Information Systems* at *Warsaw University of Technology*. \r\n\r\nThe project is a simulation of a spinning top using Euler's equations describing rigid body dynamics. The simulation parameters are easily changeable via a convenient to use user interface. Additionally, various simulation presets were added to observe different behaviors of the spinning top. Colors of all rendered elements are changeable. For trajectory's line, there are two draw modes available: points and lines. The first one is good for observation of different integration step values.\r\n\r\n## Compilation\r\n\r\nThe project is written in C++ (OpenGL) using CMake as a build system. It has two configuration CMake options: \r\n\r\n| Option | Description | \r\n| :---:         |     :---      |\r\n| `PR2_EMBEDDED_SHADERS`   | If `ON` shader code will be embedded into a resulting app's binary. If `OFF` shader code will be read from `shaders` directory, so a binary has to be run from repository root directory.      |\r\n| `PR2_SHOW_DEBUG_CONSOLE` | If `ON` - beside app's window - a debug console will be shown on app start up. If `OFF` only app's window will be shown.        |\r\n\r\n### MS Windows\r\n\r\nAll subsequent commands should be called from Windows Power Shell.\r\n\r\n```\r\ngit clone --recurse-submodules -j8 https://github.com/Tolisz/Simulation_PR2.git\r\ncd Simulation_PR2\r\ncmake -S . -B build -DPR2_EMBEDDED_SHADERS=ON -DPR2_SHOW_DEBUG_CONSOLE=OFF\r\ncmake --build build --config Release\r\n```\r\n\r\n```\r\n.\\build\\Release\\SimulationPr2.exe\r\n```\r\n\r\n### Linux\r\n\r\nAll subsequent commands should be called from terminal. Compilation was checked using **g++** (version 11.4.0) and **clang++** (version 14.0.0) compilers.\r\n\r\n```\r\n$ git clone --recurse-submodules -j8 https://github.com/Tolisz/Simulation_PR2.git\r\n$ cd Simulation_PR2\r\n$ cmake -S . -B build -DPR2_EMBEDDED_SHADERS=ON -DPR2_SHOW_DEBUG_CONSOLE=OFF\r\n$ cmake --build build --config Release -j 26\r\n```\r\n\r\n```\r\n./build/SimulationPr2\r\n```\r\n\r\n## Used Libraries\r\n\r\nLibraries `GLFW`, `GLM` and `ImGui` are used as submodules located in `externals` directory. `GLAD` is used as a generated file from [this](https://glad.dav1d.de/) web page. \r\n\r\n| Library | Licence |\r\n| :---:   | :---:   |\r\n| [GLFW](https://github.com/glfw/glfw) | [Zlib](https://github.com/glfw/glfw?tab=Zlib-1-ov-file#readme) |\r\n| [GLM](https://github.com/g-truc/glm) | [Modified MIT](https://github.com/g-truc/glm?tab=License-1-ov-file#readme)|\r\n| [ImGui](https://github.com/ocornut/imgui) | [MIT](https://github.com/ocornut/imgui?tab=MIT-1-ov-file#readme)| \r\n| [GLAD](https://github.com/Dav1dde/glad) | [MIT](https://github.com/Dav1dde/glad?tab=License-1-ov-file#readme) | \r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolisz%2Fsimulation_pr2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolisz%2Fsimulation_pr2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolisz%2Fsimulation_pr2/lists"}