## simulations.objects Class MovingPointCharge

```java.lang.Object
simulations.objects.BaseObject
simulations.objects.PointCharge
simulations.objects.MovingPointCharge
```

public class MovingPointCharge
extends PointCharge

Calculates the fields of a moving point charge (extends PointCharge)

 Field Summary ` Vec3` `a`           acceleration of the charge. ` double` `power`           the radial dependence of the Pauli repulsive force ` Vec3` `v`           Velocity of the charge

 Fields inherited from class simulations.objects.PointCharge `m, p, q, radius`

 Constructor Summary ```MovingPointCharge(double q, Vec3 p)```           Constructor for the moving point charge. ```MovingPointCharge(double q, Vec3 p, double radius)```           Constructor for the moving point charge. ```MovingPointCharge(double q, Vec3 p, double radius, double power)```           Constructor for the moving point charge. ```MovingPointCharge(double q, Vec3 p, double radius, double power, Vec3 v)```           Constructor for the moving point charge. ```MovingPointCharge(double q, Vec3 p, double radius, double power, Vec3 v, Vec3 a)```           Constructor for the moving point charge. ```MovingPointCharge(double q, Vec3 p, double radius, Vec3 v)```           Constructor for the moving point charge. ```MovingPointCharge(double q, Vec3 p, Vec3 v)```           Constructor for the moving point charge. ```MovingPointCharge(double q, Vec3 p, Vec3 v, Vec3 a)```           Constructor for the moving point charge.

 Method Summary ` void` `Acceleration(Vec3 a)`           Sets the acceleration ` Vec3` ```Bfield(Vec3 x, Vec3 B)```           the non-relativistic magnetic field of a moving point charge (v x E ) ` Vec3` ```Efield(Vec3 x, Vec3 E)```           the non-relativistic electric field of a moving point charge ` void` `Evolve(double dt)`           Evolves the position and velocity of the charge. ` Vec3` ```Pfield(Vec3 x, Vec3 P)```           The Pauli field of a moving point charge. ` java.lang.String` `toString()`           prints a string with the properties of the moving point charge

 Methods inherited from class simulations.objects.BaseObject `Bfield, Efield, Pfield`

 Methods inherited from class java.lang.Object `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

 Field Detail

### v

`public Vec3 v`
Velocity of the charge

### a

`public Vec3 a`
acceleration of the charge. Not used at present, in the future it may be used if we change this to give a relativistically correct expression for E and B ,because those expressions depend on the acceleration

### power

`public double power`
the radial dependence of the Pauli repulsive force

 Constructor Detail

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p,
Constructor for the moving point charge. Sets the acceleration and velocity to zero.

Parameters:
`q` - the charge
`p` - the position of the charge
`radius` - the Pauli radius of the charge

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p,
double power)```
Constructor for the moving point charge. Sets the velocity and acceleration to zero.

Parameters:
`q` - the charge
`p` - the position of the charge
`radius` - the Pauli radius of the charge
`power` - the radial dependence of the Pauli repulsion

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p,
Vec3 v)```
Constructor for the moving point charge. Sets the acceleration to zero.

Parameters:
`q` - the charge
`p` - the position of the charge
`radius` - the Pauli radius of the charge
`v` - the velocity of the charge

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p,
double power,
Vec3 v)```
Constructor for the moving point charge. Sets the acceleration to zero.

Parameters:
`q` - the charge
`p` - the position of the charge
`radius` - the Pauli radius
`power` - the radial dependence of the Pauli repulsion
`v` - the velocity of the charge

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p,
double power,
Vec3 v,
Vec3 a)```
Constructor for the moving point charge.

Parameters:
`q` - the charge
`p` - the position
`radius` - the radius
`power` - the radial dependence of the Pauli repulsion
`v` - the velocity of the charge
`a` - the acceleration of the charge

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p)```
Constructor for the moving point charge. Sets the acceleration and velocity to zero.

Parameters:
`q` - the charge
`p` - the acceleration

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p,
Vec3 v)```
Constructor for the moving point charge. Sets the acceleration to zero.

Parameters:
`q` - the charge
`p` - the position
`v` - the velocity

### MovingPointCharge

```public MovingPointCharge(double q,
Vec3 p,
Vec3 v,
Vec3 a)```
Constructor for the moving point charge.

Parameters:
`q` - the charge
`p` - the position
`v` - the velocity
`a` - the acceleration
 Method Detail

### Evolve

`public void Evolve(double dt)`
Evolves the position and velocity of the charge. Very naive, should be overridden

Overrides:
`Evolve` in class `BaseObject`
Parameters:
`dt` - the time step for the evolution

### Acceleration

`public void Acceleration(Vec3 a)`
Sets the acceleration

Parameters:
`a` - the acceleration

### Efield

```public Vec3 Efield(Vec3 x,
Vec3 E)```
the non-relativistic electric field of a moving point charge

Overrides:
`Efield` in class `PointCharge`
Parameters:
`x` - the position of the observer
`E` - the electric field at the position of the observer due to the charge at p (calculated)
Returns:
E the electric field at the position of the observer due to the charge at p (calculated)

### Bfield

```public Vec3 Bfield(Vec3 x,
Vec3 B)```
the non-relativistic magnetic field of a moving point charge (v x E )

Overrides:
`Bfield` in class `PointCharge`
Parameters:
`x` - the position of the observer
`B` - the magnetic field at the observer's position if the charge is at p and its velocity is v (calculated)
Returns:
B the magnetic field at the observer's position if the charge is at p and its velocity is v (calculated)

### Pfield

```public Vec3 Pfield(Vec3 x,
Vec3 P)```
The Pauli field of a moving point charge. The Pauli field is returned as a multiple of the electric field of the particle.

Overrides:
`Pfield` in class `BaseObject`
Parameters:
`x` - the position of the observer
`P` - the Pauli repulsive field (calculated)
Returns:
P the Pauli repulsive field (calculated)

### toString

`public java.lang.String toString()`
prints a string with the properties of the moving point charge

Overrides:
`toString` in class `PointCharge`