Skip to content

πŸ‘ Written using a SAPE instance, these visual simulations explore various concepts in mathematics and physics, along with some imaginative and made-up scenarios.

License

Notifications You must be signed in to change notification settings

OpZest/DynamicSimulations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dynamic Simulations

Written using a Semi-Autonomous Production Engine instance (SAPE), these visual simulations explore various concepts in mathematics and physics, along with some imaginative and made-up scenarios.

Render examples

  • 3-body problem: Link
  • Triangle escape: Link
  • Ball vs. ceiling: Link
  • Ball vs. circles: Link

Processing simulations

To use the simulations provided in this repo, follow these steps:

1. Download Processing

2. Clone the repository or download a specific simulation

  • Clone this repo or download a specific simulation from the simulations/processing folder. Each simulation folder contains the necessary files.

3. Open the simulation in Processing

  • Navigate to the simulation's folder and open sim.pde in Processing.

4. Running the simulation/rendering a video

4A. If you want to render a video of the simulation:

  • Ensure initializeRendering is set to true in sim.pde.
  • Hit play in Processing to start the simulation.
  • After running the simulation:
    • Navigate to the render folder.
    • Open the folder with the latest rendering session (e.g., "001").
    • Open commands.txt and copy the full rendering command.
    • Open a terminal at the root folder of the simulation and paste the command.
    • Execute the command in the terminal.
  • The video will be rendered as output_final.mp4 in the respective render session folder.

4B. If you do not want to render a video:

  • Make sure initializeRendering is set to false in sim.pde.
  • Hit play in Processing to run the simulation.

Pygame simulations

1. Clone the repository or download a specific simulation

  • Clone this repo or download a specific simulation from the simulations/pygame folder. Each simulation folder contains the necessary files.

2. Installing dependencies

  • To run the simulations, you need to have the following libraries installed: pygame, opencv-python, moviepy, and pydub. You can install these dependencies using pip:
pip install pygame opencv-python moviepy pydub

3. Navigate to the simulation's folder:

  • Each simulation is contained within its own folder in the simulations/pygame directory.

4. Running the simulation/rendering a video

4A. If you want to render a video of the simulation:

  • Open sim.py.
  • Ensure the RENDER_VIDEO variable is set to True.
  • Run the script.
  • The simulation will render a video file named simulation_with_audio.mp4 in the simulation's folder.

4B. If you do not want to render a video:

  • Open sim.py.
  • Ensure the RENDER_VIDEO variable is set to False.
  • Run the script.

About

πŸ‘ Written using a SAPE instance, these visual simulations explore various concepts in mathematics and physics, along with some imaginative and made-up scenarios.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published