Electric Field Line Simulation in C
This program simulates electric field lines using the C programming language.
It calculates the electric fields generated by positive and negative charges, then visualizes their corresponding field lines.
The simulation provides insight into electric field behavior in complex configurations.
Features
- Supports both positive and negative charges.
- Dynamically calculates resulting electric fields.
- Generates graphical representations of field lines.
Screenshots
Simulation with 10 positive charges, 10 negative charges, and 50 field lines
Simulation with 100 positive charges, 100 negative charges, and 5000 field lines
Simulation with 5 positive charges, 10 negative charges, and 500 field lines
Running the Program
To launch the simulation, follow these steps:
- Prerequisites: Make sure you have a C compiler (such as
gcc
) andmake
installed. - Clone the repository:
git clone git@github.com:ArianDervishaj/simulation-lignes-de-champs.git
- Compile and run:
cd simulation-lignes-de-champs make main ./main <number_of_positive_charges> <number_of_negative_charges> <number_of_field_lines>