.. java:import:: ch.epfl.leb.sass.models.samples RefractiveIndex .. java:import:: ch.epfl.leb.sass.models.illuminations ElectricField .. java:import:: ch.epfl.leb.sass.models.illuminations ElectricFieldBuilder .. java:import:: org.apache.commons.math.util MathUtils .. java:import:: org.apache.commons.math3.complex Complex .. java:import:: org.apache.commons.math3.complex ComplexUtils .. java:import:: org.apache.commons.math3.geometry.euclidean.threed Vector3D SquareUniformElectricField ========================== .. java:package:: ch.epfl.leb.sass.models.illuminations.internal :noindex: .. java:type:: public class SquareUniformElectricField implements ElectricField Creates a uniform electric field of square shape propagating in the +z-direction. This electric field is uniformly polarized and of the same magnitude within the area (0, width), (0, height). It extends from z = 0 to z = infinity. Obviously, it is not physical but is a good approximation of a plane wave with finite energy. The field propagates in the z-direction. :author: Kyle M. Douglass Methods ------- getEx ^^^^^ .. java:method:: @Override public Complex getEx(double x, double y, double z) :outertype: SquareUniformElectricField Returns the x-component of the time-independent electric field at the position (x, y, z). :param x: The x-position within the sample. :param y: The y-position within the sample. :param z: The z-position within the sample. :return: The x-component of the electric field at the position (x, y, z). getEy ^^^^^ .. java:method:: @Override public Complex getEy(double x, double y, double z) :outertype: SquareUniformElectricField Returns the y-component of the time-independent electric field at the position (x, y, z). :param x: The x-position within the sample. :param y: The y-position within the sample. :param z: The z-position within the sample. :return: The y-component of the electric field at the position (x, y, z). getEz ^^^^^ .. java:method:: @Override public Complex getEz(double x, double y, double z) :outertype: SquareUniformElectricField Returns the z-component of the time-independent electric field at the position (x, y, z). :param x: The x-position within the sample. :param y: The y-position within the sample. :param z: The z-position within the sample. :return: The z-component of the electric field at the position (x, y, z). getRefractiveIndex ^^^^^^^^^^^^^^^^^^ .. java:method:: public RefractiveIndex getRefractiveIndex() :outertype: SquareUniformElectricField Returns the sample's refractive index that produced this field. :return: The refractive index distribution of the sample. getWavelength ^^^^^^^^^^^^^ .. java:method:: @Override public double getWavelength() :outertype: SquareUniformElectricField Returns the radiation's wavelength. :return: The wavelength of the radiation.