{"id":18637602,"url":"https://github.com/justin-marian/projectile-trajectory","last_synced_at":"2026-06-22T06:31:24.881Z","repository":{"id":225730670,"uuid":"766516218","full_name":"justin-marian/projectile-trajectory","owner":"justin-marian","description":"Simple dynamic simulation of the projectile motion (ballistic curve).","archived":false,"fork":false,"pushed_at":"2024-03-08T22:42:45.000Z","size":1166,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T13:52:41.309Z","etag":null,"topics":["ballistic-curve","matlab","physics-simulation","plotting","projectile-motion"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","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/justin-marian.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-03T13:40:23.000Z","updated_at":"2024-03-06T04:33:06.000Z","dependencies_parsed_at":"2024-03-08T23:46:49.176Z","dependency_job_id":null,"html_url":"https://github.com/justin-marian/projectile-trajectory","commit_stats":null,"previous_names":["justin-marian/projectile-trajectory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justin-marian/projectile-trajectory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fprojectile-trajectory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fprojectile-trajectory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fprojectile-trajectory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fprojectile-trajectory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justin-marian","download_url":"https://codeload.github.com/justin-marian/projectile-trajectory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fprojectile-trajectory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34637937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":["ballistic-curve","matlab","physics-simulation","plotting","projectile-motion"],"created_at":"2024-11-07T05:37:00.529Z","updated_at":"2026-06-22T06:31:24.858Z","avatar_url":"https://github.com/justin-marian.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Projectile Trajectory\n\n## Description\n\nThe Projectile Trajectory is a `MATLAB/Octave` script designed to simulate the **trajectory of a projectile** launched into the air under the influence of *gravity* and *air resistance*. It is a computational model that provides insights into the motion of a projectile, computing various quantities and visualizing the trajectory for analysis and understanding.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/justin-marian/projectile-trajectory/tree/main/demo/simulation.mp4\" style=\"width: 75%; height: 100%;\" \u003e\n    \u003cimg src=\"./images/velocity_position_curve.png\" alt=\"VELOCITY_POSITION_CURVE\" width=\"49%\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/justin-marian/projectile-trajectory/tree/main/demo/simulation.mp4\" style=\"width: 75%; height: 100%;\" \u003e\n    \u003cimg src=\"./images/trajectory_animation.png\" alt=\"TRAJECTORY_ANIMATION\" width=\"49%\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Intended Use Cases\n\n- **Educational Purposes:** Serves as an invaluable resource for students to understand and visualize the principles of projectile motion in detailed physics education.\n- **Engineering Applications**: Offers insights and practical utility for engineers working on complex projects in areas such as ballistics and aerospace engineering.\n\n## Key Features\n\n**Visualization:**\n\n- `Plotting`: Generates detailed plots of velocity components, trajectory, and motion laws to vividly visualize the projectile's motion over time for enhanced understanding.\n- `Animation`: Crafts an engaging animated visualization of the trajectory, offering a comprehensive and dynamic representation of the projectile's path through space.\n\n**Output and Analysis:**\n\n- `Log Files`: Logs the computed quantities and results for detailed further analysis, debugging, performance evaluation, and convenient future reference.\n- `Output Directory`: Methodically organizes the generated plots and detailed log files in a structured output directory for streamlined access and effective management.\n\n**Relevant Metrics:**\n\n- `Flight Time`: Computes the total time the projectile spends in the air.\n- `Range`: Calculates the horizontal distance traveled by the projectile.\n- `Maximum Altitude`: Determines the highest point reached by the projectile.\n- `Ascent and Descent Times`: Identifies the time taken for the projectile to ascend and descend.\n- `Heat Produced`: Estimates the heat generated during the motion of the projectile.\n\n```r\n   ============= PROJECTILE MOTION =============\n            Flight Time: 4.587242 s\n            Range: 0.426711 km\n            Maximum Altitude: 0.027452 km\n            Ascent Time: 1.995086 s\n            Descent Time: 2.592156 s\n            Heat Produced: 21.942012 kJ\n   =============================================\n   ============= PROJECTILE MOTION =============\n            Flight Time: 16.925352 s\n            Range: 0.652901 km\n            Maximum Altitude: 0.371898 km\n            Ascent Time: 5.946745 s\n            Descent Time: 10.978606 s\n            Heat Produced: 86.794148 kJ\n   =============================================\n   .......\n```\n\n## Additional Information\n\n- **Animation:** The animation provides a dynamic and visually engaging representation of the projectile's trajectory, allowing users to observe its movement in real-time with accuracy and clarity.\n- **Result Files:** Alongside the `log.txt` file, the script generates `png images` depicting the **trajectory**, **velocity**, and position **curve** as functions of time, providing visual aids for analysis and presentation.\n\n## Usage\n\n- **First, Chnage Directory TO `src`** and be inside of it, (*for saving `png` files inside of `images` directory*).\n- **Run Script:** Execute the `test_projectile.sh` script in your terminal. You have a list of **3 options**.\n  - `1` to **run** the projectile simulation.\n  - `2` to **clean** up the log file.\n  - `3` to **exit** the program.\n\n- **Call Function:** To simulate the trajectory of a projectile programmatically, use the:\n  - `projectile_trajectory(v0, alpha0)` function, where:\n    - `v0` is the **initial velocity** (*in m/s*)\n    - `alpha0` is the **launch angle** (*in degrees*).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-marian%2Fprojectile-trajectory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustin-marian%2Fprojectile-trajectory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-marian%2Fprojectile-trajectory/lists"}