-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the N-Body Simulation project! This simulation allows you to explore the dynamics of an N-body system with gravity, electromagnetism, collisions, and friction. You can control various parameters for each object, including speed, mass, charge, and position.
-
Open the Simulation: Navigate to the project repository on GitHub and open the
index.htmlfile in a web browser, or use the online version : link. -
Full-Screen Mode: To enter full-screen mode, click the "Full-screen" button at the bottom-left of the screen or press
F11. -
Start/Pause Simulation: Click the "Start simulation" button to start the simulation. Click it again to pause.
-
Add/Remove Objects: Use the "Add Object" button to add a new object to the simulation. To remove an object, use the corresponding control options that appear when you select the object.
-
Object Controls: Each object can be individually controlled. You can adjust the mass, velocity (in x and y directions), and position (in x and y directions).
-
Time Interval (
dt): Adjust the time interval for simulation steps in the "Time Interval" input field. Smaller values make the simulation more realistic, but slow it down. -
Gravity and Electromagnetic Forces: Toggle gravity and electromagnetic forces using the checkboxes under "Enable Gravity" and "Activate the electromagnetic force". Electromagnetic or gravitational fields can also be displayed in real time using the corresponding checkboxes.
-
Collisions and Friction: Enable or disable collision detection and friction using their respective checkboxes. The friction coefficient can be adjusted if friction is enabled.
-
Reset View: Click the "Reset View" button to reset the simulation view.
-
Zoom: Adjust the zoom level using the zoom buttons. You can zoom in or out by factors of 2 or 10 using the buttons in the controls, or by scrolling the mouse over the simulation canvas. On cell phones, you can change the zoom using a pinch gesture.
-
Mouse Movement: Move around the simulation area by dragging the mouse.
-
Field visualization: You can activate the visualization of the simulation's gravity or electromagnetic fields using the checkboxes
-
Help: A small help button in the top right-hand corner of the canvas provides useful links to the website.
-
Save Preset: Click "Save Preset" to save the current simulation state. Enter a name for the preset, or leave it blank for a default name.
-
Load Preset: Select a preset from the "Choose a preset" dropdown and click "Load Preset" to load it.
-
Gravity: Toggle gravity with the
gkey. -
Collisions: Toggle collisions with the
ckey. -
Reset View: Reset the view with the
rkey. -
Friction: Toggle friction with the
fkey. -
Show Speed Vectors: Display speed vectors with the
vkey. -
Play/Pause: Start or pause the simulation with the
space barorenterkey. -
Full-Screen: Toggle full-screen mode with the
F11key.
The simulation supports several languages. You can select the language of your choice from the drop-down menu at the top of the control panel.
Feel free to contribute to the project or raise issues if you encounter any problems. Happy simulating!