{"id":23879527,"url":"https://github.com/tolisz/simulation_pr3","last_synced_at":"2026-02-14T12:03:05.325Z","repository":{"id":270888092,"uuid":"892642162","full_name":"Tolisz/Simulation_PR3","owner":"Tolisz","description":"Jelly Simulator","archived":false,"fork":false,"pushed_at":"2025-01-03T20:04:59.000Z","size":29267,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T23:41:19.307Z","etag":null,"topics":["cpp20","ffd","free-form-deformation","jelly","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-22T13:54:45.000Z","updated_at":"2025-01-04T22:32:55.000Z","dependencies_parsed_at":"2025-01-03T20:38:37.621Z","dependency_job_id":null,"html_url":"https://github.com/Tolisz/Simulation_PR3","commit_stats":null,"previous_names":["tolisz/simulation_pr3"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Tolisz/Simulation_PR3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tolisz","download_url":"https://codeload.github.com/Tolisz/Simulation_PR3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tolisz%2FSimulation_PR3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267621596,"owners_count":24116900,"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-07-29T02:00:12.549Z","response_time":2574,"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","ffd","free-form-deformation","jelly","opengl","simulation"],"created_at":"2025-01-03T23:17:35.476Z","updated_at":"2026-02-14T12:03:05.318Z","avatar_url":"https://github.com/Tolisz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Jelly Simulator\r\n\r\nhttps://github.com/user-attachments/assets/6be7c8a8-e1dc-4ff9-931d-c66ebc43b431\r\n\r\nhttps://github.com/user-attachments/assets/769b8ef9-d1eb-44ff-addd-8cf4ba0aeb8e\r\n\r\n## About project\r\n\r\nThis is the third 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 64 mass points arranged in a 4x4x4 cube (**jelly**) and connected to each other by springs. Jelly's corner points are connected to the corners of **the control frame** with special springs of zero rest length. User can freely move and rotate the control frame that the jelly will follow.\r\n\r\nThe jelly is inside **the collision frame** that he can't get out of. The control frame can be freely moved outside the collision frame. \r\n\r\nNormaly the jelly is rendered as **6 Bézier patches** based on control points which are outer jelly's points. Additionally, any user's model can be inserted inside the jelly. A model will be deformed using **free-form deformation (FFD)**: \r\n\r\n$$F(u, v, w) = \\sum_{i}^3\\sum_{j}^3\\sum_{k}^3 P^{ijk} B_i^3(u)B_j^3(v)B_j^3(w),$$\r\n\r\nwhere  $`(u, v, w) \\in [0, 1]^3`$, $`P^{ijk}`$ - jelly points, $`B^3_i(t)`$ - bernstein polynomial.\r\n\r\nThe project has **4 example models** which can be found in `./resources/models` folder.\r\n\r\nUser model shading is computed based on this definition of FFD transofrmation.\r\n\r\n## Navigation\r\n\r\n\u003ctable\u003e\r\n    \u003ctbody\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003cth colspan=2\u003e Camera\u003c/th\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003ctd\u003e\u003ckbd\u003eMMB\u003c/kbd\u003e \u003ci\u003ehold\u003c/i\u003e\u003c/td\u003e\r\n            \u003ctd\u003ecamera rotation\u003c/td\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003ctd\u003e\u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003eMMB\u003c/kbd\u003e \u003ci\u003ehold\u003c/i\u003e\u003c/td\u003e\r\n            \u003ctd\u003ecamera movement\u003c/td\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003ctd\u003e\u003ckbd\u003eMMB\u003c/kbd\u003e \u003ci\u003escroll\u003c/i\u003e\u003c/td\u003e\r\n            \u003ctd\u003ecamera zoom in/out\u003c/td\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003cth colspan=2\u003e Collision Frame (if enabled)\u003c/th\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003ctd\u003e\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eLMB\u003c/kbd\u003e\u003c/td\u003e\r\n            \u003ctd\u003emove collision frame\u003c/td\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003ctd\u003e\u003ckbd\u003eR\u003c/kbd\u003e\u003c/td\u003e\r\n            \u003ctd\u003erotate collision frame around camera's \u003ccode\u003efront\u003c/code\u003e vector. To accept rotation click \u003ckbd\u003eLMB\u003c/kbd\u003e\u003c/td\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003ctd\u003e\u003ckbd\u003eR\u003c/kbd\u003e + \u003ckbd\u003eR\u003c/kbd\u003e\u003c/td\u003e\r\n            \u003ctd\u003erotate collision frame around camera's \u003ccode\u003eright\u003c/code\u003e and \u003ccode\u003eup\u003c/code\u003e vectors. To accept rotation click \u003ckbd\u003eLMB\u003c/kbd\u003e\u003c/td\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003cth colspan=2\u003e Jelly's points (if collision frame is disabled)\u003c/th\u003e\r\n        \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n            \u003ctd\u003e\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eLMB\u003c/kbd\u003e\u003c/td\u003e\r\n            \u003ctd\u003emove selected point\u003c/td\u003e\r\n        \u003c/tr\u003e\r\n\t\u003c/tbody\u003e\r\n\u003c/table\u003e\r\n\r\n######\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| `PR3_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| `PR3_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_PR3.git\r\ncd Simulation_PR3\r\ncmake -S . -B build -DPR3_EMBEDDED_SHADERS=ON -DPR3_SHOW_DEBUG_CONSOLE=OFF\r\ncmake --build build --config Release\r\n```\r\n\r\n```\r\n.\\build\\Release\\SimulationPr3.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_PR3.git\r\n$ cd Simulation_PR3\r\n$ cmake -S . -B build -DPR3_EMBEDDED_SHADERS=ON -DPR3_SHOW_DEBUG_CONSOLE=OFF\r\n$ cmake --build build --config Release -j 26\r\n```\r\n\r\n```\r\n./build/SimulationPr3\r\n```\r\n\r\n## Used Libraries\r\n\r\nLibraries `GLFW`, `GLM`, `Assimp`, `STB` and `ImGui` are used as submodules located in `externals` directory. `GLAD` is used as a generated file from [glad](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| [STB](https://github.com/nothings/stb) | [Modified MIT](https://github.com/nothings/stb?tab=License-1-ov-file#readme) | \r\n| [Assimp](https://github.com/assimp/assimp/) | [BSD](https://github.com/assimp/assimp/?tab=License-1-ov-file#readme) | \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolisz%2Fsimulation_pr3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolisz%2Fsimulation_pr3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolisz%2Fsimulation_pr3/lists"}