Skip to content

ahmniab/Projectile-motion-simulator

Repository files navigation

Projectile motion simulator

Warning

This software is unfinished. Keep your expectations low.

Usage

This app is designed to generate HD(1920x1080) videos that simulates the motion of Projectile
This is A video that shows what it looks like

G_is-10.00_V0_is-15_angle_is-45_slow_is_1.0.mp4

How to use it

Textboxes

You can enter the values you want in textbox there are 4 textboxes img

  1. Angle : this takes integer value like( 1 , 2 ,3 ) only , (1.1 , 0.3) are not allowed
  2. Velocity: The values as same as Angle
  3. Gravity: Takes float values like (9.9 , 8.5)
  4. Slowdown: Takes values like Gravity , this value slow down the time , the value 1 does no affect , the value 2 will slowdown the time by 2 and so on .... ,

Checkboxes

There is one checkbox for now it for drawing Velocity components all video time if you un check it the components will be drown on the max height the ball will reach only

keyboard

  1. ESC This key is specialized to exit from program
  2. Space This key is specialized to preview the ball path
  3. Ctrl + R These two keys are specialized to render the final video
  4. F This key is specialized to go full screen

Render

The final video is rendered using FFMPEG
So don't worry about this window ffmpeg

Download

Windows (64 bit)

you can download it from here Projectile motion simulator
Please you need trust me when this warning appears

warning

This project is fully open source and safe

Linux

Fedora 64bit X server

Build

for linux

To build this project you have to install raylib first
Then you can run this command

gcc -o PMS main.c movement/movement.c movement/physics/engine.c helper.c objs/ball.c objs/values_board.c controles/text_box.c controles/controles.c objs/angle_arrow.c movement/timer.c movement/queue/queue.c ffmpeg_linux.c controles/checkbox.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

You also need to download FFMPEG

sudo apt install ffmpeg         [On Debian, Ubuntu and Mint]
sudo yum install ffmpeg         [On RHEL/CentOS/Fedora and Rocky/AlmaLinux]
sudo emerge -a sys-apps/ffmpeg  [On Gentoo Linux]
sudo apk add ffmpeg             [On Alpine Linux]
sudo pacman -S ffmpeg           [On Arch Linux]
sudo zypper install ffmpeg      [On OpenSUSE]    
sudo pkg install ffmpeg         [On FreeBSD]

NOTE: Makefile doesn't work yet

Windows soon

NOTE

These files ffmpeg.h ffmpeg_windows.c ffmpeg_linux.c ARE NOT MINE I toke them from musializer

Feedback

Email : ahmnaib11@gmail.com
LinkedIn: https://www.linkedin.com/in/ahmniab/

About

Projectile motion simulator

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages