Skip to content

Simulation of the inclined throw using Django and Docker.

Notifications You must be signed in to change notification settings

51moon/projectile_motion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Projectile Motion Simulation

This project uses Django and Docker to display a simulation of an inclined projectile motion with air resistance in a web application.

Overview

The simulation calculates the trajectory of a projectile under the influence of gravity and air resistance. It solves the following differential equation: $$m\ddot{\vec{r}} = \vec{F}_G + \vec{F}_D$$ where the gravitational force $\vec{F}_G$ is given by

$$\vec{F}_G = m\begin{pmatrix}0 \\ -g\end{pmatrix}$$

and the air drag force $\vec{F}_D$ is given by

$$\vec{F}_D = -\frac{1}{2} c_F \left|\vec{v}\right| \begin{pmatrix}v_x \\v_y\end{pmatrix}.$$

Features

  • Simulation of projectile motion with adjustable initial conditions
  • Realistic modeling of air resistance
  • Interactive web interface to visualize the trajectory
  • Easy setup with Docker

Prerequisites

Setup

  1. Clone the repository:

    git clone https://github.com/51moon/projectile_motion.git
    cd projectile_motion
  2. Create and activate a virtual environment:

    python -m venv .venv
    source .venv/bin/activate
  3. Build the Docker image:

    docker build -t projectile_motion .
  4. Run the Docker container:

    docker run -it -p 8080:8080 projectile_motion

Now you can access the development server at http://0.0.0.0:8080.

Preview