|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoptics.Optics
optics.ParaxialMatrix
optics.ParaxialGroup
public class ParaxialGroup
Class to hold a ParaxialGroup
, begin a paraxial
representation of a group of optical elements, typically a
compound lens which in represented by the underlying
ParaxialMatrix
.
The location of planes are in global coordinates.
This class also implemnts the Diagram2DComponent
so it can be added to a Diagram2D
. The focal
input/output and principle planes are drawn.
Field Summary | |
---|---|
protected double |
inputHeight
Height of input plane |
protected double |
inputPlane
Location of input plane |
protected boolean |
label
Boolean flag to put on labels on daigrams ( false by default). |
protected double |
outputHeight
Height of output plane |
Fields inherited from class optics.ParaxialMatrix |
---|
A, B, C, D, thickness |
Fields inherited from class optics.Optics |
---|
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS, version |
Constructor Summary | |
---|---|
ParaxialGroup()
Default constructor forms a ParaxialGroup \
consisting of the unit system matrix of thickness zero with
input plane also at zero and input/output heights are unset. |
|
ParaxialGroup(OpticalGroup g,
double lambda)
Form a ParaxialGroup from an
OpticalGroup at a
given wavelength. |
|
ParaxialGroup(ParaxialGroup g)
Form a ParaxialGroup from
specified ParaxialGroup . |
|
ParaxialGroup(ParaxialMatrix m)
Form a ParaxialGroup with specified
Paraxial system matrix with input plane at the origin. |
|
ParaxialGroup(ParaxialMatrix m,
double input)
Form a ParaxialGroup with specified Paraxial
system matrix with specified input plane in global coordinate. |
|
ParaxialGroup(ParaxialMatrix m,
double input,
double fno)
Form a ParaxialGroup with specified Paraxial matrix
with specified input plane in global coordinate and effective
FNo. |
|
ParaxialGroup(ParaxialMatrix m,
double input,
double inheight,
double outheight)
Form a ParaxialGroup with specified
ParaxialMatrix
specified input plane in global coordinate annd specifed
input and output plane heights. |
Method Summary | |
---|---|
ParaxialGroup |
clone()
Method to form clone of current ParaxialGroup |
void |
draw(Graphics2D g)
Method to draw the Group planes in a Graphics2D context. |
double |
getBackFocal()
Return position of back focal plane in global coordinates. |
double |
getBackPrincipal()
Return position of back principal plane in global coordinates. |
Rectangle2D |
getBounds()
Method to get the Bounds for graphics rendering. |
double |
getFrontFocal()
Return position of front focal plane in global coordinates. |
double |
getFrontPrincipal()
Return position of front principal plane in global coordinates. |
double |
getInputHeight()
Method to get the input plane height |
double |
getInputPlane()
Get position of input plane in global coordinates. |
double |
getOutputHeight()
Method to get the input plane height |
double |
getOutputPlane()
Return position the output plane in global coordinates. |
Position |
imagePosition(Position object)
Method to get an image Position for a three-dimensional object Position using simple Gaussian lens formula. |
void |
multBy(ParaxialGroup g)
Method to pre-multiply the current ParaxialGroup
This will also propaate from the output plane of the current
group to the input plane of the specified group. |
static ParaxialGroup |
read(File file)
Method to read an ParaxialGroup
from a text file where each line
of the file specifies one type of optical component. |
static ParaxialGroup |
read(Reader in)
Method to read an optical matrix from abstract Reader with each line specifying an optical component. |
static ParaxialGroup |
read(String fn)
Method to read an ParaxialGroup
from a text file where each line
of the file specifies one type of optical component. |
static ParaxialGroup |
readChooser()
Static method to read a ParaxuialGroup
via a filechooser windows. |
static ParaxialGroup |
readChooser(String dir)
Static method to read a Paraxial Group from a file via a chooser. |
void |
scale(double a)
Method to scale the ParaxialGroup . |
void |
setFNo(double fno)
Method to set the FNo of the Group which sets the input and output heights using the front and back focal lengths. |
void |
setHeight(double h)
Method to set the Input and Output height to a single value |
void |
setInputHeight(double h)
Method to set the input plane height. |
void |
setInputPlane(double input)
Set the position on input plane in global coordinates |
void |
setLabel()
Method to switch-on labels in Diagrams |
void |
setOutputHeight(double h)
Method to set the output plane height |
String |
toString()
Default toString method to give formatted output of matrix elements, thickness, input plane, and input and output heights. |
boolean |
write()
Method to write current ParaxialGroup to System.out |
boolean |
write(File file)
Method to write current ParaxialGroup to a File |
boolean |
write(PrintStream out)
Method to write the current ParaxialGroup to a PrintStream |
boolean |
write(String fileName)
Method to write current ParaxialGroup to file by name |
boolean |
writeChooser(String dir)
Method to write Paraxial Group from a file via a chooser. |
Methods inherited from class optics.ParaxialMatrix |
---|
cavity, determinant, dielectric, dielectric, doublet, edit, edit, fromGroup, fromGroup, fromGroup, fromPlanes, getA, getB, getBackFocalLength, getBackPower, getC, getD, getFrontFocalLength, getFrontPower, getThickness, inverse, mirror, mult, multBy, propagation, setBackFocalLength, setElements, setElements, setFrontFocalLength, thickLens, thinLens, thinLens, 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 |
---|
protected double inputPlane
protected double inputHeight
protected double outputHeight
protected boolean label
false
by default).
Constructor Detail |
---|
public ParaxialGroup(ParaxialMatrix m, double input, double inheight, double outheight)
ParaxialGroup
with specified
ParaxialMatrix
specified input plane in global coordinate annd specifed
input and output plane heights.
m
- the system matrixinput
- the input plane.inheight
- height of input planeoutheight
- height of output planepublic ParaxialGroup(ParaxialMatrix m, double input, double fno)
ParaxialGroup
with specified Paraxial matrix
with specified input plane in global coordinate and effective
FNo.
m
- the system matrixinput
- the input plane.fno
- the effective FNopublic ParaxialGroup(ParaxialMatrix m, double input)
ParaxialGroup
with specified Paraxial
system matrix with specified input plane in global coordinate.
The input and output heights are unset.
m
- the system matrixinput
- the input plane.public ParaxialGroup(ParaxialMatrix m)
ParaxialGroup
with specified
Paraxial system matrix with input plane at the origin.
The input and output heights are not set.
m
- the system matrixpublic ParaxialGroup()
ParaxialGroup
\
consisting of the unit system matrix of thickness zero with
input plane also at zero and input/output heights are unset.
public ParaxialGroup(ParaxialGroup g)
ParaxialGroup
from
specified ParaxialGroup
.
g
- the ParaxialGrouppublic ParaxialGroup(OpticalGroup g, double lambda)
ParaxialGroup
from an
OpticalGroup
at a
given wavelength. The OpticalGroup is assume to
be on-axis.
g
- the OpticalGrouplambda
- the wavelength in micronsMethod Detail |
---|
public ParaxialGroup clone()
ParaxialGroup
clone
in class ParaxialMatrix
ParaxialGroup
clone of current.public void setInputPlane(double input)
input
- the input plane location.public double getInputPlane()
double
location of input planepublic double getOutputPlane()
double
location of system output planepublic void setInputHeight(double h)
h
- the heightpublic double getInputHeight()
double
input plane heightpublic void setOutputHeight(double h)
h
- the heightpublic double getOutputHeight()
double
input plane heightpublic void setHeight(double h)
h
- the height.public void setFNo(double fno)
fno
- the effective FNopublic double getFrontPrincipal()
getFrontPrincipal
in class ParaxialMatrix
double
location of front Principal plane.public double getBackPrincipal()
getBackPrincipal
in class ParaxialMatrix
double
location of back Principal plane.public double getFrontFocal()
getFrontFocal
in class ParaxialMatrix
double
location of front focal plane.public double getBackFocal()
getBackFocal
in class ParaxialMatrix
double
location of back focal plane.public void setLabel()
public void scale(double a)
ParaxialGroup
.
The underlying ParaxialMatrix
and plane heights are scaled, but the input plane is
NOT changed.
scale
in class ParaxialMatrix
a
- the scale factorpublic void multBy(ParaxialGroup g)
ParaxialGroup
This will also propaate from the output plane of the current
group to the input plane of the specified group.
g
- the pre-multiplier.public Position imagePosition(Position object)
Note: infinities are not trapped.
object
- position of object
Position
Gaussian position of imagepublic String toString()
toString
in class ParaxialMatrix
String
formatted output.Optics.setFormatString(java.lang.String)
public Rectangle2D getBounds()
getBounds
in interface Diagram2DComponent
Rectangle2D
the bounds of the
ParaxialGroup
public void draw(Graphics2D g)
draw
in interface Diagram2DComponent
g
- the Graphics2Dpublic static ParaxialGroup readChooser()
ParaxuialGroup
via a filechooser windows.
public static ParaxialGroup readChooser(String dir)
dir
is null, then the environmental variable
LENSROOT
is used,
if this is also null, then finally $HOME is used.
dir
- the lens root directory
ParaxialMatrix
the paraxial matrixpublic static ParaxialGroup read(String fn)
ParaxialGroup
from a text file where each line
of the file specifies one type of optical component.
fn
- file name holding matrix information
public static ParaxialGroup read(File file)
ParaxialGroup
from a text file where each line
of the file specifies one type of optical component.
file
- File holding matrix information
public static ParaxialGroup read(Reader in)
in
- Reader holding the matrix
ParaxialMatrix
the system matrix.public boolean write()
boolean
true is success, false if write fails.public boolean write(String fileName)
fileName
- the file name
boolean
true is success, false if write fails.public boolean write(File file)
file
- the File to write to.
boolean
true is success, false if write fails.public boolean writeChooser(String dir)
dir
- the lens root directory
ParaxialMatrix
the paraxial matrixpublic boolean write(PrintStream out)
out
- the PrintSteam.
boolean
true is success, false if wriute fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |