- Equations
- Numerical Implementation
- Editor Variables
Large thanks to Luis Lehner, Vasileios Paschalidis, and Frans Pretorius for the following resource: [https://lavinia.as.arizona.edu/~vpaschal/maxwell_constraint_damping.pdf]
The fields are stored as large arrays of size
The fields are evolved with the Semi-implicit Euler method, with appropriate
For rendering, the field and derivative arrays are read with the reverse coordinate transformation, and interpolated to yield a smoother picture.
Vector3Int resolution
: Size of the domain in voxels along the x, y and z axes respectively.
float lengthScale
: Physical size of 1 voxel (at the center of the domain). Units are in light-seconds
.
float timestep
: Timestep size for numerical evolution. Units are in seconds
.
float slice
: Z-axis position of the XY plane rendered to the screen. The center of the domain is resolution.z / 2
float zoom
: Rendered scale of the domain. Magnification is
float vectorScale
: Rendered scale of vector field. Vector length scale is multiplied by
int recordInterval
: Number of simulation frames per frame saved to disk.
int recordCutoff
: Number of frames to save to disk.
ComputeShader shader
: Compute shader used for computation and rendering.
RenderTexture screen
: Render texture that shader
renders to.