{"id":19848727,"url":"https://github.com/etcwilde/springs","last_synced_at":"2025-10-16T17:31:51.528Z","repository":{"id":80177810,"uuid":"50647917","full_name":"etcwilde/Springs","owner":"etcwilde","description":"Spring Mass Systems","archived":false,"fork":false,"pushed_at":"2016-02-26T16:44:07.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T12:47:54.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/etcwilde.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":"2016-01-29T08:01:44.000Z","updated_at":"2016-02-01T22:32:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"6029516b-f20c-46d3-a82e-653bf45bb126","html_url":"https://github.com/etcwilde/Springs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcwilde%2FSprings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcwilde%2FSprings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcwilde%2FSprings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etcwilde%2FSprings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etcwilde","download_url":"https://codeload.github.com/etcwilde/Springs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241226819,"owners_count":19930487,"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-11-12T13:18:12.578Z","updated_at":"2025-10-16T17:31:51.434Z","avatar_url":"https://github.com/etcwilde.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Springs\nSpring Mass Systems • Evan Wilde • CSC 473\n\nThe scenes have a simple interface. In both scenes, the spacebar will start the simulation and\npause it.\n\nIn both scenes, the spring is shown as a blue line. In the linear spring system, the line will\nstretch and shrink as expected with a spring. It will also swing as a pendulum due to the effects\nof gravity. In the angular spring, the link will simply swing to the rest angle of the spring.\n\n## Navigation\n\nNavigation is obtained through use of the mouse.\nSimply holding the middle mouse button allows the user to tumble the camera to the angle they desire.\nScrolling allows the user to dolly the camera on increments, whereas the user may hold the CTRL key\nand hold the middle mouse button to dolly smoothly. Holding shift allows the user to track the camera;\nhowever, the camera will still tumble around the origin of the scene.\n\n- Dolly: scroll / ctrl + middle mouse\n- Tumble: middle mouse\n- Track: Shift + middle mouse\n- Reset: r\n\n## Linear Spring\n\n\n![Linear Spring](docs/linear.png)\n\nThe linear spring system consists of a fixed point and a free mass. All calculations are in the\nCartesian coordinate system.\n\nIntegration was done with the basic Euler integrator. For the single spring-mass system, the\nEuler integrator is fully sufficient for handling the calcuations. When we add more springs\ninto the system, a more powerful integration method may be necessary.\n\n### Extra Controls\n\n- Q: Increase the length of the spring by 0.25\n- E: Decrease the length of the spring by 0.25\n- W: Move the fixed point of the spring along the z axis by 1\n- S: Move the fixed point of the spring along the z axis by -1\n- D: Move the fixed point of the spring along the x axis by -1\n- A: Move the fixed point of the spring along the x axis by 1\n\n\n## Torision Spring\n\n![Torsion Spring](docs/angular.png)\n\nThe torsion spring calculations are performed entirely in spherical coordinates. This coordinate\nsystem makes sense as the spring is given a fixed point origin and a rod of constant length that\ncan move around the fixed point. No calculations were to be performed on the length of the rod,\nand only on the angle that the rod protruded from the fixed point. A mousetrap is an example of\nthis system if the coefficient were set high enough. Unlike the mouse trap, the spring is able to\nrotate with two degrees of freedom, though, in practice this is kind of weird to look at and hard\nto imagine; however, I'm fairly confident in the results we are seeing. While in the CPU, the\ncoordinates were entirely in spherical coordinates.\n\nThe position is passed to the GPU still in spherical coordinates, we then allow the\nGPU to make the conversion from spherical coordinates to the Cartesian coordinate\nsystem, then multiplying that against the MVP matrix to find the final point of the\nmass at that time step. While the information is in the CPU, the data is all spherical\ncoordinates.\n\nAgain, basic Euler integration was used in calculating the angular velocity and position.\n\n### Extra Controls\n\nThe torsion spring system adds some additional controls beyond the basic controls outlined in Navigation.\n\n- Q: Increase the length of the rod by 0.25\n- E: Decrease the length of the rod by 0.25\n- W: Rotate the theta component of the resting position by 1 degree\n- S: Rotate the theta component of the resting position by -1 degree\n- A: Rotate the phi component of the resting position by 1 degree\n- D: Rotate the phi component of the resting position by -1 degree\n- Z: Increase the mass by 0.5 grams\n- X: Decrease the mass by 0.5 grams\n- F: Increase the spring constant (Be careful with this)\n- G: Decrease the spring constant (Be careful with this)\n\n### Additional Details\n\nThe velocity and positions are implemented as two-vectors, since the length of the rod\nis held constant. Removing the length component from the calculations until the data is\npassed to the GPU keeps us from making the mistake of including that in the vector\ncalculations. This produces some interesting results, but is utimately not correct.\n\n## Extra Notes\n\nUnfortunately, the scene switching in Atlas is not yet working correctly. As such, we can\nonly comment out the scene we don't want and recompile. Once the implementation within\nAtlas is working correctly, switching between the scenes will allow the user to view both\nwithout restarting the application.\n\nAs Atlas is the framework provided with the course, it is beyond the scope of the assignment\nto fix this bug within Altas, and therefore, if the feature within Alas worked, it would work\nfine.\n\nIf scene switching worked, the sceens could be switched using `tab` to go to the next scene.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetcwilde%2Fsprings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetcwilde%2Fsprings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetcwilde%2Fsprings/lists"}