{"id":23296147,"url":"https://github.com/cedmandocdoc/indayog","last_synced_at":"2025-07-21T12:04:22.452Z","repository":{"id":57273335,"uuid":"365922861","full_name":"cedmandocdoc/indayog","owner":"cedmandocdoc","description":"Oscillation as a function of time","archived":false,"fork":false,"pushed_at":"2021-05-12T01:42:39.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T21:42:03.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/cedmandocdoc.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}},"created_at":"2021-05-10T05:00:45.000Z","updated_at":"2021-05-12T01:38:26.000Z","dependencies_parsed_at":"2022-08-26T13:11:53.099Z","dependency_job_id":null,"html_url":"https://github.com/cedmandocdoc/indayog","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cedmandocdoc/indayog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedmandocdoc%2Findayog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedmandocdoc%2Findayog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedmandocdoc%2Findayog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedmandocdoc%2Findayog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedmandocdoc","download_url":"https://codeload.github.com/cedmandocdoc/indayog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedmandocdoc%2Findayog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266296812,"owners_count":23907014,"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-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2024-12-20T07:10:06.806Z","updated_at":"2025-07-21T12:04:22.424Z","avatar_url":"https://github.com/cedmandocdoc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Indayog\n\nJavaScript implementation of oscillation functions\n\n## Overview\n\nIndayog `(Filipino term for movement that oscillates)` is a library that simulates oscillation like simple and damped harmonic motion as a function of time.\n\n## Installation\n\nInstall it using [npm](https://www.npmjs.com/package/indayog) or [yarn](https://yarnpkg.com/package/indayog).\n\n```bash\nnpm install indayog\n```\n\n## Example\n\n```js\nimport { shm, dhm } from \"indayog\";\n\n// Simple Harmonic Motion\nconst computeSHM = shm();\n\n// call to calculate displacement\n// given a time in milliseconds\ncomputeSHM(0);   // 0\ncomputeSHM(50);  // 37.76882\ncomputeSHM(100); // 69.94279\n\n// Damped Harmonic Motion\nconst computeDHM = dhm();\n\n// call to calculate displacement and velocity\n// given a time in milliseconds\ncomputeDHM(0);    // { displacement: 100, velocity: -700 }\ncomputeDHM(1500); // { displacement: -0.28667, velocity: 8.47011 }\ncomputeDHM(3000); // { displacement: 0, velocity: 0 }\n```\n\n## Configuration\n\n```js\n// Default config for SHM\nshm({\n  mass: 50,\n  stiffness: 3000,\n  initialDisplacement: 100\n});\n\n// Default config for DHM\ndhm({\n  mass: 50,\n  stiffness: 3000,\n  damping: 350,\n  initialDisplacement: 100,\n  initialVelocity: 0,\n  precision: 0.01\n});\n\n// Note: In damped harmonic precision\n// config pertains to how precise\n// the simulation would stop since\n// some motion may require longer time\n// but the frequency difference is so\n// little that it won't matter\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/cedmandocdoc/indayog/blob/master/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedmandocdoc%2Findayog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedmandocdoc%2Findayog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedmandocdoc%2Findayog/lists"}