{"id":22687257,"url":"https://github.com/gituser12981u2/tensegrity_optimization","last_synced_at":"2025-06-21T21:04:56.737Z","repository":{"id":266342858,"uuid":"898060504","full_name":"gituser12981u2/tensegrity_optimization","owner":"gituser12981u2","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-10T02:35:58.000Z","size":1516,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T15:42:52.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gituser12981u2.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-12-03T18:04:41.000Z","updated_at":"2024-12-10T02:36:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d4b3713-ef23-4dbd-aafa-54aad1f25ef0","html_url":"https://github.com/gituser12981u2/tensegrity_optimization","commit_stats":null,"previous_names":["gituser12981u2/tensegrity_optimization"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gituser12981u2/tensegrity_optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gituser12981u2%2Ftensegrity_optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gituser12981u2%2Ftensegrity_optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gituser12981u2%2Ftensegrity_optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gituser12981u2%2Ftensegrity_optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gituser12981u2","download_url":"https://codeload.github.com/gituser12981u2/tensegrity_optimization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gituser12981u2%2Ftensegrity_optimization/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261193093,"owners_count":23122905,"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":[],"created_at":"2024-12-09T23:17:31.988Z","updated_at":"2025-06-21T21:04:51.716Z","avatar_url":"https://github.com/gituser12981u2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThis Tensegrity program aims to visualize a tensegrity system dynamically in order to optimize to its general geometric structure for both dynamic loads and extending resistance to failure at points.\n\nThis simulator includes:\n\n- Dynamic simulation with verlet evolution\n- Energy conservation analysis\n- Real-time 3D visualization with matplotlib animate\n- Material property consideration for the cables and struts\n- Physical constraint enforcement.\n\n## Physics Model\n\nThe simulator uses steel cables with a stiffness of 2000 N/m, and a maximum tension of 2000N and aluminum struts with a stiffness of 1000 N/m and a maximum compression of 1000N. These values can be changed in the client code to simulate different material. The perturbance can also be modified in the client code as well as the general node/strut/cable structure of the tensegrity system to simulate entirely different systems.\n\nThe system tracks three different types of energy: kinetic energy, gravitational potential energy, and elastic potential energy.\n\n### Output\n\nThe code outputs a live viewing of the evolution of the inputted tensegrity system along with graphs for an energy analysis and error rate over time.\n\n![alt text](image.png)\n\nThis how the tensegrity system evolves to be in static equilibrium after a small perturbance. It can be seen in the energy analysis, specifically the elastic, how the perturbance evolves throughout the system to \"squash\" it and get the system back into static equilibrium.\n\n![alt text](image-1.png)\n\nThe exact outputs for the energy analysis and error rate are outputted to the console for closer analysis.\n\n### Color coding\n\n- Red dashed lines: Cables (tension elements)\n- Blue solid lines: Struts (compression elements)\n- Black dots: Nodes\n\n### Connection to statics\n\nThe equations of static equilibrium, sum F = 0 and sum M = 0, are intrinsically represented in the dynamic simulation, specifically in the `get_forces()` method in `TensegritySystem`. The system evolves according to Newtons Second Law (F=ma), and when the acceleration approaches zero, the equations naturally reduce to the static equilibrium conditions.\n\n### Dynamic equations\n\nThe dynamic equation used is the velocity Verlet integration method for position updates and velocity updates and are as so:\n\nx(t + Δt) = x(t) + v(t)Δt + (1/2)a(t)Δt²\nv(t + Δt) = v(t) + (1/2)(a(t) + a(t + Δt))Δt\n\nHere is a link to the wikipedia page for Verlet integration:\n\n\u003chttps://en.wikipedia.org/wiki/Verlet_integration\u003e\n\nThey are known for having excellent energy conservation properties in molecular dynamics and structural simulations, with the energy error rate of the system being usually negligible for engineering purposes.\n\n### Verification of results\n\n1. The equations implemented are well established equations, such as the verlet equations and the equations for kinetic energy, potential energy, and gravitional energy. These can be, and have been, verified for simple scenarios in the tests module to make sure energy is calculated properly.\n\n2. The system enforces physically realistic behavior through its code structure. The cables are coded to operate exclusively in tension and the struts are coded to only function in compression, and the energy analysis mirrors that. The outputted values are realistic, in that they have no large jumps or obviously unreal numbers that don't make sense.\n\n3. The system demonstrates appropriate energy conservation and stability characteristics. When the structure reaches static equilibrium, the energy remains constant--which makes sense for static objects. This is shown to not be just a fluke because the system can be perturbed and as long as it doesn't fail, break, then the KE, EPE, and GPE graph will eventually go back to being constant, which is indicative of a static system.\n\n### Post script\n\nDue to limited time, I did not have time to implement optimization path formulas that dynamically change the geometric structure of the tensegrity system. This program merely acts as a dynamic simulation of a tensegrity system and can be used to show how they work and how energy evolves over time in a static tensegrity system, or how the system acts when perturbed as a certain point. It can also be used to create any tensegrity system, by customizing the arrangement of nodes and cable and struct connections and see how the energy analysis changes and if the tensegrity structure remains static.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgituser12981u2%2Ftensegrity_optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgituser12981u2%2Ftensegrity_optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgituser12981u2%2Ftensegrity_optimization/lists"}