|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoptics.Optics
optics.graphics.Singlet2D
public class Singlet2D
Class to draw a Singlet lens in the Graphics2D scheme
Field Summary |
---|
Fields inherited from class optics.Optics |
---|
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS |
Constructor Summary | |
---|---|
Singlet2D(OpticalSurface f,
OpticalSurface b)
Form a Singlet2D object with a specified
front and back OpticalSurface . |
Method Summary | |
---|---|
void |
draw(java.awt.Graphics2D g)
Method to actually draw the lens in a Graphics2D
context. |
java.awt.geom.Rectangle2D |
getBounds()
Method to get the bounds of the lens being a box which enclosed the lens in global coordinates. |
void |
setIndexColour(java.awt.Color c)
Method to set/reset the index colour being the colour used to represent the ``glass''. |
Methods inherited from class optics.Optics |
---|
getDefaultWaveLength, getErrorStream, getFormatString, getName, getStaticName, getVersion, printError, setDefaultWaveLength, setErrorStream, setFormatString, setMicrons |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Singlet2D(OpticalSurface f, OpticalSurface b)
Singlet2D
object with a specified
front and back OpticalSurface
.
The front surface must be REFRACTING
and the refractive index between the surfaces must be
defined (and NOT Air).
f
- the front OpticalSurfaceb
- the back OpticalSurfaceMethod Detail |
---|
public void setIndexColour(java.awt.Color c)
Colour.RefractiveIndexColour(double)
at wavelengths
Constants.GREEN
.
c
- the Color to to the glass.Colour.RefractiveIndexColour(double)
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface Diagram2DComponent
Rectangle2D
the boundspublic void draw(java.awt.Graphics2D g)
Graphics2D
context. The surfaces are draw using quadric curves with the
control points set by the on-axis and edge points. The actual
curve does not depend only curve type so may be
slightly out for highly curves surfaces. This is only
a drawing artifact and does not affect the actual ray
calculations.
draw
in interface Diagram2DComponent
g
- the Graphics2D context
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |