Skip to content

A small project to simulate electric charges and electric fields constrained to a 2D plane

Notifications You must be signed in to change notification settings

aadit-n3rdy/phy6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

A small project to simulate electric charges and electric fields constrained to a 2D plane

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages