# Andrei Galiautdinov

## PHYS4201/4202 - Electricity & Magnetism

DESCRIPTION: This code plots electrostatic field lines for a collection of point charges.

MAIN GOAL: To draw the field lines in such a way that their volume density is proportional to the electric flux
penetrating any finite surface area.

MAIN IDEA: Start field lines very close from a given charge. Then, if the initial points are distributed
*uniformly* over a tiny sphere surrounding the charge, the propagated lines will
automatically "adjust" themselves in space with correct volume density.

MAIN PROBLEM: In general, it is impossible to *uniformly* distribute an arbitrary number M of points
on the surface of a sphere. That can only be done for M = 4, 6, 8, 12, and 20,
which correspond to the number of vertices of the so-called Platonic solids.

NOTE 1: Thus, in our implementation of the code, the number of field lines originating on a given
charge is proportional to the charge and equal to the number of vertices of the corresponding
Platonic solid. Due to this restriction, only charges q = 1, 1.5, 2, 3, 5, -1, -1.5, -2, -3, -5,
may be used.

NOTE 2: If net charge is *positive* (or *zero*), only field lines originating on *positive* charges are
propagated. In this case, propagation direction is *forward*.

If net charge is *negative*, only field lines originating on *negative* charges are propagated.
In this case, propagation direction is *backward*.

NOTE 3: *Position vectors* should be entered as [1 -3 5], or [1, -3, 5], etc. Make sure that the charges
are "reasonably well" localized.

YOU HAVE TO SPECIFY:

Number of positive charges;
Positive charges;
Locations of positive charges;
Number of negative charges;
Negative charges;
Locations of negative charges;

YOU MAY WANT TO START WITH A SIMPLE SYSTEM, say, a dipole with 1 positive charge +5
located at [0 0 0] and 1 negative charge -5 located at [0 0 1].

• 2015 SPRING - PHYS4202/6202 - E&M II (Part 1, ~ 30 Mb)
1. Operational Definition of the Electric & Magnetic Fields
2. Magnetic Dipole Moment
3. Magnetism in Matter
5. Maxwell's Correction
• 2015 SPRING - PHYS4202/6202 - E&M II (Part 2, ~ 31 Mb)
1. Poynting's Theorem
2. The Wave Equation
3. Fields of a Uniformly Moving Charge
4. Lienard-Wiechert Potentials* (optional)