{"id":23105767,"url":"https://github.com/maxwellmatthis/differential-equation-simulator","last_synced_at":"2025-10-14T18:04:56.711Z","repository":{"id":192656918,"uuid":"687144359","full_name":"maxwellmatthis/differential-equation-simulator","owner":"maxwellmatthis","description":"A small program and framework for visualizing physical objects moving around.","archived":false,"fork":false,"pushed_at":"2023-09-18T10:08:35.000Z","size":7925,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-14T18:04:50.090Z","etag":null,"topics":["2d","animation","differential-equations","math","physics"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxwellmatthis.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}},"created_at":"2023-09-04T18:06:54.000Z","updated_at":"2023-09-14T17:52:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbd51e1a-54eb-4cbd-ae86-f636882b75fd","html_url":"https://github.com/maxwellmatthis/differential-equation-simulator","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":0.09999999999999998,"last_synced_commit":"0591326c06f3343cc15ba3f96f0eadacb76300b6"},"previous_names":["maxwellmatthis/differential-equation-simulator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxwellmatthis/differential-equation-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwellmatthis%2Fdifferential-equation-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwellmatthis%2Fdifferential-equation-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwellmatthis%2Fdifferential-equation-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwellmatthis%2Fdifferential-equation-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxwellmatthis","download_url":"https://codeload.github.com/maxwellmatthis/differential-equation-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxwellmatthis%2Fdifferential-equation-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020319,"owners_count":26086864,"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-10-14T02:00:06.444Z","response_time":60,"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":["2d","animation","differential-equations","math","physics"],"created_at":"2024-12-17T00:54:43.093Z","updated_at":"2025-10-14T18:04:56.636Z","avatar_url":"https://github.com/maxwellmatthis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# differential-equation-simulator\n\nA small program and framework for visualizing physical objects moving around.\n\n# How to Use - Example\n\n```js\n// make sure to update the names of these elements to your own\nconst engineTime = document.querySelector(\"span#engine-time\");\nconst realTime = document.querySelector(\"span#real-time\");\nconst fps = document.querySelector(\"span#fps\");\n/** @type {HTMLCanvasElement} */\nconst canvas = document.querySelector(\"canvas#view\");\n\nimport { Engine, Rect } from \"./lib.js\";\n\nclass ConstantX extends Rect {\n  constructor(ix, iy, dt, v = 40) {\n    super(ix, iy, dt);\n    this.registerCompute((dt) =\u003e {\n      this.x = this.x + v * dt; // s(t_2) = s(t_1) + s'(t_1) * (t_2 - t_1)\n      v *= this.verticalEdgeBounceFactor(v); // flips v_x vector when the `Rect` touches the left or right edge\n    });\n  }\n}\n\nconst engine = new Engine(canvas, [ new ConstantX(10, 20, 0.01) ]);\nengine.registerHTMLComponents(engineTime, realTime, fps);\nengine.run(50); // run the engine for 50s\n```\n\n# Demo\n\nhttps://github.com/maxwellmatthis/differential-equation-simulator/assets/58150536/de5732c8-a65b-43f0-8666-f14741d02c89\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxwellmatthis%2Fdifferential-equation-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxwellmatthis%2Fdifferential-equation-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxwellmatthis%2Fdifferential-equation-simulator/lists"}