blackcaer / Oblique-Throw-Simulation

Interactive and customizable simulation of oblique projectile motion with SFML

Repository from Github https://github.comblackcaer/Oblique-Throw-SimulationRepository from Github https://github.comblackcaer/Oblique-Throw-Simulation

Oblique Throw Simulation

A dynamic simulation of oblique projectile motion with an interactive and customizable user experience.

This project was independently developed as a final project to complete the Introduction to Computer Science course ahead of schedule during my studies.

πŸ“„ Project Presentation

You can view the original project presentation by clicking the link below:

Features

🎨 Interactive GUI

  • Manual configuration of simulation parameters:
    • Initial speed
    • Launch angle
    • Initial height
    • Gravity acceleration
  • Real-time display of position and velocity components (Vx, Vy)
  • Visualization of the projectile's trajectory

πŸŽ› Simulation Controls

  • Pause, resume, or reset the simulation
  • Toggle between a ball-following or static view
  • Dynamically adjust zoom levels

βš™οΈ Advanced Customization

  • Modify appearance via a configuration file:
    • Background, ball, and ground colors
    • Ball radius and tracer size
    • Name of the statistics output file

πŸ“Š Statistics & Analysis

  • Displays final flight parameters:
    • Range, max height, and time to max height
  • Saves simulation statistics to a specified file

πŸ›  Config Values

  • Set colors using uint32 numbers (max value for white: 4294967295)

Controls

  • S β†’ Start movement
  • G β†’ Pause movement
  • R β†’ Restart the simulation
  • Z β†’ Zoom in
  • X β†’ Zoom out
  • C β†’ Center view on the ball
  • V β†’ Toggle ball-following view

Configuration

Configuration file can be changed in config.txt file

Example "Dark Mode" Config:

stats_file=stats.txt
color_ball=252645375
color_background=2305343
color_ground=5980671
unit_to_px=50
ball_radius=20
view_change=50
tracer_radius=10

Default Config:

stats_file=stats.txt
color_ball=
color_background=
color_ground=
unit_to_px=
ball_radius=
view_change=
tracer_radius=

About

Interactive and customizable simulation of oblique projectile motion with SFML


Languages

Language:C++ 100.0%