optics
Class ParaxialMatrix

java.lang.Object
  extended by optics.Optics
      extended by optics.ParaxialMatrix
Direct Known Subclasses:
ParaxialGroup

public class ParaxialMatrix
extends Optics

Class to implement a ParaxialMatrix for propagation between input and output planes. The ParaxialMatrix consists of four matrix elements plus a thickness.


Field Summary
protected  double A
          The A matrix element.
protected  double B
          The B matrix element.
protected  double C
          The C matrix element.
protected  double D
          The D matrix element.
protected  double thickness
          The thickness, so distance between input and output planes.
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS
 
Constructor Summary
ParaxialMatrix()
          Default constructor to create an Paraxial Matrix with elements set to Unit Matrix of thickness zero.
ParaxialMatrix(double a, double b, double c, double d)
          Create a ParaxialMatrix setting elements to specified values and thickness to zero.
ParaxialMatrix(double a, double b, double c, double d, double t)
          Create ParaxialMatrix and setting elements and thickness to specified values.
ParaxialMatrix(ParaxialMatrix m)
          Constructor to form ParaxialMatrix with values taken from specified ParaxialMatrix.
 
Method Summary
static ParaxialMatrix cavity(double leftCurvature, double d, double rightCurvature)
          Static to form system matrix for a laser cavity with two mirrors and specified separation.
 ParaxialMatrix clone()
          Method to return a clone (copy) of the current ParaxialMatrix
 double determinant()
          Method to calculate the determinant.
static ParaxialMatrix dielectric(double n0, double n1)
          Static method to return the ParaxialMatrix for a flat dielectric interface between two refractive indices.
static ParaxialMatrix dielectric(double n0, double n1, double c)
          Static method to return the ParaxialMatrix for a spherical dielectric interface between two refractive indices.
static ParaxialMatrix doublet(double fc, double fn, double ft, double mc, double sn, double st, double bc)
          Static Method to return the ParaxialMatrix for a doublet
 void edit()
          Method to invoke the ParaxialMatrixEditor of type MATRIX to directly edit the matrix elements.
 void edit(int type)
          Method to invoke the ParaxialMatrixEditor to specified type to edit the matrix.
static ParaxialMatrix fromGroup(OpticalGroup g)
          Static method for form the ParaxialMatrix from an OpticalGroup at the DEFAULT_WAVELENGTH.
static ParaxialMatrix fromGroup(OpticalGroup g, double lambda)
          Static method to form a ParaxialMatrix from a Optical Group at a specified wavelength.
static ParaxialMatrix fromGroup(OpticalGroup g, double lambda, int first, int last)
          Static to form a ParaxialMatrix from an OpticalGroup at specified wavelength
static ParaxialMatrix fromPlanes(double frontPrincipal, double backPrincipal, double focalLength, double thickness)
          Static method to form a system matrix from focal length, principal planes and thickness.
 double getA()
          Method to return top-left or A matrix element.
 double getB()
          Method to return top-right or B matrix element.
 double getBackFocal()
          Return location of back focal plane relative to the output plane.
 double getBackFocalLength()
          Return the back focal length.
 double getBackPower()
          Return the back power.
 double getBackPrincipal()
          Return the position of the back principal plane relative to the output plane.
 double getC()
          Method to return lower-left or C matrix element.
 double getD()
          Method to return lower-right or D matrix element.
 double getFrontFocal()
          Return location of front focal plane relative to the input plane.
 double getFrontFocalLength()
          Return the front focal length.
 double getFrontPower()
          Return the front power.
 double getFrontPrincipal()
          Return the position of the front principal plane relative to the input plane.
 double getThickness()
          Method to return the thickness being distance from input to output plane.
 void inverse()
          Forms the inverse of the current in place where the current values are overwritten.
static ParaxialMatrix mirror(double c)
          Static method to return the ParaxialMatrix for spherical mirror of specified curcature.
 ParaxialMatrix mult(ParaxialMatrix p)
          Method to pre-multiply the current ParaxialMatrix by the specified ParaxialMatrix and return a new ParaxialMatrix.
 void multBy(ParaxialMatrix p)
          Method to pre-multiply the current ParaxialMatrix by the specified ParaxialMatrix.
static ParaxialMatrix propagation(double d)
          Static method to return the propagation ParaxialMatrix for specifided distance.
 void scale(double a)
          Method to scale the current ParaxialMatrix by a constant.
 void setBackFocalLength(double f)
          Set the back focal length to specified by scaling the matrix.
 void setElements(double a, double b, double c, double d, double t)
          Method to set (or re-set) the elements of the ParaxialMatrix.
 void setElements(ParaxialMatrix m)
          Method to set (or re-set) the elements of an ParaxialMatrix with specified ParaxialMatrix.
 void setFrontFocalLength(double f)
          Set the front focal length to specified value by scaling the matrix.
static ParaxialMatrix thickLens(double fc, double n, double thick, double bc)
          Static method to return the ParaxialMatrix for a thick lens with two specified radii and a thickness.
static ParaxialMatrix thinLens(double f)
          Static method to return the ParaxialMatrix for a thin lens of specified focal length.
static ParaxialMatrix thinLens(double fc, double n, double bc)
          Static method to return the ParaxialMatrix for a thin lens with two specified radii and refractive index.
 java.lang.String toString()
          toString method to format ParaxialMatrix to a string using current format string.
 double trace()
          Method to calculate the trace.
 
Methods inherited from class optics.Optics
getDefaultWaveLength, getErrorStream, getFormatString, getName, getStaticName, getVersion, printError, setDefaultWaveLength, setErrorStream, setFormatString, setMicrons
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

A

protected double A
The A matrix element.


B

protected double B
The B matrix element.


C

protected double C
The C matrix element.


D

protected double D
The D matrix element.


thickness

protected double thickness
The thickness, so distance between input and output planes.

Constructor Detail

ParaxialMatrix

public ParaxialMatrix()
Default constructor to create an Paraxial Matrix with elements set to Unit Matrix of thickness zero.


ParaxialMatrix

public ParaxialMatrix(double a,
                      double b,
                      double c,
                      double d)
Create a ParaxialMatrix setting elements to specified values and thickness to zero.

Parameters:
a - top-left matrix element
b - top-right matrix element
c - lower-left matrix element
d - lower-right matrix element

ParaxialMatrix

public ParaxialMatrix(double a,
                      double b,
                      double c,
                      double d,
                      double t)
Create ParaxialMatrix and setting elements and thickness to specified values.

Parameters:
a - top-left matrix element
b - top-right matrix element
c - lower-left matrix element
d - lower-right matrix element
t - thickness

ParaxialMatrix

public ParaxialMatrix(ParaxialMatrix m)
Constructor to form ParaxialMatrix with values taken from specified ParaxialMatrix.

Parameters:
m - the specifying ParaxialMatrix
Method Detail

clone

public ParaxialMatrix clone()
Method to return a clone (copy) of the current ParaxialMatrix

Overrides:
clone in class java.lang.Object
Returns:
ParaxialMatrix clone of current matrix

setElements

public void setElements(double a,
                        double b,
                        double c,
                        double d,
                        double t)
Method to set (or re-set) the elements of the ParaxialMatrix.

Parameters:
a - top-left matrix element
b - top-right matrix element
c - lower-left matrix element
d - lower-right matrix element
t - thickness

setElements

public void setElements(ParaxialMatrix m)
Method to set (or re-set) the elements of an ParaxialMatrix with specified ParaxialMatrix.

Parameters:
m - specifying ParaxialMatrix

getA

public double getA()
Method to return top-left or A matrix element.

Returns:
double being the A matrix element.

getB

public double getB()
Method to return top-right or B matrix element.

Returns:
double being the B matrix element.

getC

public double getC()
Method to return lower-left or C matrix element.

Returns:
double being the C matrix element.

getD

public double getD()
Method to return lower-right or D matrix element.

Returns:
double being the D matrix element.

getThickness

public double getThickness()
Method to return the thickness being distance from input to output plane.

Returns:
double the thickness.

scale

public void scale(double a)
Method to scale the current ParaxialMatrix by a constant. Element B and thickness are multiplied by a, element C is divided by a and the other two elements are unchanged.

Parameters:
a - the scaling constant

toString

public java.lang.String toString()
toString method to format ParaxialMatrix to a string using current format string.

Overrides:
toString in class java.lang.Object
Returns:
String being formatted matrix.
See Also:
Optics.setFormatString(java.lang.String)

mult

public ParaxialMatrix mult(ParaxialMatrix p)
Method to pre-multiply the current ParaxialMatrix by the specified ParaxialMatrix and return a new ParaxialMatrix. Neither the current of specifying matrix are altered.

Parameters:
p - to pre-multiply the current.
Returns:
ParaxialMatrix the resulting new ParaxialMatrix.

multBy

public void multBy(ParaxialMatrix p)
Method to pre-multiply the current ParaxialMatrix by the specified ParaxialMatrix. The current ParaxialMatrix is overwritten with the updated one.

Parameters:
p - to pre-multiply the current.

determinant

public double determinant()
Method to calculate the determinant.

Returns:
double the determinant.

trace

public double trace()
Method to calculate the trace.

Returns:
double the trace

inverse

public void inverse()
Forms the inverse of the current in place where the current values are overwritten. The thickness is also negated.


getBackFocalLength

public double getBackFocalLength()
Return the back focal length.

Returns:
double The focal length.

getBackPower

public double getBackPower()
Return the back power.

Returns:
double the back power.

getBackFocal

public double getBackFocal()
Return location of back focal plane relative to the output plane.

Returns:
double position of back focal plane

getBackPrincipal

public double getBackPrincipal()
Return the position of the back principal plane relative to the output plane.

Returns:
double position of back principal plane.

getFrontFocalLength

public double getFrontFocalLength()
Return the front focal length.

Returns:
double the front focal length.

getFrontPower

public double getFrontPower()
Return the front power.

Returns:
double The focal length.

getFrontFocal

public double getFrontFocal()
Return location of front focal plane relative to the input plane.

Returns:
double position of front focal plane

getFrontPrincipal

public double getFrontPrincipal()
Return the position of the front principal plane relative to the input plane.

Returns:
double position of front principal plane.

setBackFocalLength

public void setBackFocalLength(double f)
Set the back focal length to specified by scaling the matrix. This assumes that the matrix is the system matrix of a lens group.

Parameters:
f - the new focal length

setFrontFocalLength

public void setFrontFocalLength(double f)
Set the front focal length to specified value by scaling the matrix. This assumes that the matrix is the system matrix of a lens group.

Parameters:
f - the new focal length

edit

public void edit(int type)
Method to invoke the ParaxialMatrixEditor to specified type to edit the matrix.

Parameters:
type - editor type
See Also:
ParaxialMatrixEditor

edit

public void edit()
Method to invoke the ParaxialMatrixEditor of type MATRIX to directly edit the matrix elements. Execution will be suspended until the editor is closed.


propagation

public static ParaxialMatrix propagation(double d)
Static method to return the propagation ParaxialMatrix for specifided distance.

Parameters:
d - the propagation distance.
Returns:
ParaxialMatrix for propagation

thinLens

public static ParaxialMatrix thinLens(double f)
Static method to return the ParaxialMatrix for a thin lens of specified focal length.

Parameters:
f - the focal length in mm.
Returns:
ParaxialMatrix of a thin lens

mirror

public static ParaxialMatrix mirror(double c)
Static method to return the ParaxialMatrix for spherical mirror of specified curcature.

Parameters:
c - curvature to the mirror.
Returns:
ParaxialMatrix of a spherical mirror

dielectric

public static ParaxialMatrix dielectric(double n0,
                                        double n1)
Static method to return the ParaxialMatrix for a flat dielectric interface between two refractive indices.

Parameters:
n0 - the first refractive index
n1 - the second refractive index
Returns:
ParaxialMatrix for flat dielectric

dielectric

public static ParaxialMatrix dielectric(double n0,
                                        double n1,
                                        double c)
Static method to return the ParaxialMatrix for a spherical dielectric interface between two refractive indices.

Parameters:
n0 - the first refractive index
n1 - the second refractive index
c - curvature of the surface.
Returns:
ParaxialMatrix of spherical dielectric.

thickLens

public static ParaxialMatrix thickLens(double fc,
                                       double n,
                                       double thick,
                                       double bc)
Static method to return the ParaxialMatrix for a thick lens with two specified radii and a thickness.

Parameters:
fc - curvature of front
n - the refractive index
thick - thickness
bc - curvature of back surface.
Returns:
ParaxialMatrix of a thick lens

thinLens

public static ParaxialMatrix thinLens(double fc,
                                      double n,
                                      double bc)
Static method to return the ParaxialMatrix for a thin lens with two specified radii and refractive index.

Parameters:
fc - curvature of front surface
n - refractive index
bc - curvature of back surface
Returns:
ParaxialMatrix of thin lens.

doublet

public static ParaxialMatrix doublet(double fc,
                                     double fn,
                                     double ft,
                                     double mc,
                                     double sn,
                                     double st,
                                     double bc)
Static Method to return the ParaxialMatrix for a doublet

Parameters:
fc - front surface curvature.
fn - first refractive index.
ft - first thickness
mc - middle curvature
sn - second refractive index
st - second thickness
bc - back surface curvature.
Returns:
ParaxialMatrix of a doublet.

cavity

public static ParaxialMatrix cavity(double leftCurvature,
                                    double d,
                                    double rightCurvature)
Static to form system matrix for a laser cavity with two mirrors and specified separation. Matrix defines as being at the surface of the left mirror.

Parameters:
leftCurvature - curvature of left mirror
d - distance to second mirror
rightCurvature - curvature of right mirror

fromPlanes

public static ParaxialMatrix fromPlanes(double frontPrincipal,
                                        double backPrincipal,
                                        double focalLength,
                                        double thickness)
Static method to form a system matrix from focal length, principal planes and thickness. See optics solution 3.7 for equations.

Parameters:
frontPrincipal - front principal, relative to input
backPrincipal - back principal, relative to output plane
focalLength - system focal length (back and front equal)
thickness - distance between input and output planes.
Returns:
ParaxialMatrix from principal planes.

fromGroup

public static ParaxialMatrix fromGroup(OpticalGroup g,
                                       double lambda)
Static method to form a ParaxialMatrix from a Optical Group at a specified wavelength.

Parameters:
g - the OpticalGroup
lambda - The wavelength in microns

fromGroup

public static ParaxialMatrix fromGroup(OpticalGroup g)
Static method for form the ParaxialMatrix from an OpticalGroup at the DEFAULT_WAVELENGTH.

Parameters:
g - the OpticalGroup.

fromGroup

public static ParaxialMatrix fromGroup(OpticalGroup g,
                                       double lambda,
                                       int first,
                                       int last)
Static to form a ParaxialMatrix from an OpticalGroup at specified wavelength

Parameters:
g - the OpticalGroup
lambda - The wavelength in microns
first - the first surface to be included
last - the last surface to be included (zero for last