Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 2.56 KB

README.md

File metadata and controls

68 lines (49 loc) · 2.56 KB

Phy6

An open-source simulator electric charges and electric fields constrained within a 2-dimensional plane

Table of Contents

Synopsis

This project is intended to get a more intuitive grasp of electrostatics, especially the concepts that would be covered in a undergrad course on computer science. No complicated algorithms have been used, the project works completely based on calculating forces and displacements over very small timesteps.

Build Instructions

  • Install the SDL2 library
  • Use CMake to build the project and run the executable
cmake -B build
cmake --build build

Usage

  • The only argument is the path to the JSON file to parse for input.
  • If no argument is given, the examples/simple.json is loaded.
  • Use UP and DOWN arrow keys to zoom in and out, and W-A-S-D to move the camera around
  • Refer the JSON files in the examples/ folder for information on writing custom configurations.

Libraries Used

Demos

Simple:

Cyclotron:

Circular motion under B:

Credits and Contributors

All forms of contributions are welcomed!