Skip to content

NamanRajput-git/Akira_GravitySim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŒ Akira_GravitySim

A 2D gravity simulation built in Java using Swing. Create celestial bodies, control their mass and velocity, and watch them interact with real-time Newtonian physics.


๐Ÿช Features

  • ๐Ÿ–ฑ Click to add new planets with custom mass and velocity
  • ๐ŸŽš Sliders for adjusting mass and initial velocity
  • โฏ Pause/Resume simulation
  • ๐Ÿ” Zoom and pan controls (mouse wheel & drag)
  • ๐Ÿงญ Toggle coordinates and velocity display

๐Ÿš€ Getting Started

โœ… Requirements

  • Java 8 or higher
  • IntelliJ IDEA (or any IDE)

๐Ÿ›  How to Run

  1. Clone the repository:
    git clone https://github.com/NamanRajput-git/Akira_GravitySim.git
    cd akira_GravitySim
    
    

Open in IntelliJ:

  1. File โ†’ Open โ†’ Select the Akira -> src folder

  2. Run Akira.java (main class)

##๐ŸŽฎ Controls Action Description: Left Click --> Add new planet , Right Click + Drag --> Pan , Scroll Wheel --> Zoom in/out , Pause Button --> Pause/Resume simulation , "Show Info" Button --> Toggle coordinates/velocity info ๐Ÿง  Physics Based on Newton's Law of Universal Gravitation:

F = G * (m1 * m2) / rยฒ

Euler integration for position and velocity updates.

##๐Ÿ“„ License This project is licensed under the MIT License โ€” feel free to use and modify.

##๐Ÿค Contributing Pull requests are welcome! If you have cool ideas (collisions? orbit trails? black holes?), bring them in.

##โญ๏ธ If you like this project... Give it a star ๐ŸŒŸ on GitHub!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages