optics
Class QuadricSurface

java.lang.Object
  extended by optics.Optics
      extended by optics.OpticalSurface
          extended by optics.OpticalPlane
              extended by optics.QuadricSurface
All Implemented Interfaces:
Diagram2DComponent
Direct Known Subclasses:
AsphericSurface, ParabolicSurface, QuadricMirror, SphericalSurface

public class QuadricSurface
extends OpticalPlane

Class to implements a general QuadricSurface in a plane. The conventional spherical and parabilic surfaces are special cases of this surface.


Field Summary
protected  double curvature
          The surface curvature
protected  double epsilon
          The shape factor
 
Fields inherited from class optics.OpticalPlane
blockedNormal, maxRadius, planeNormal
 
Fields inherited from class optics.OpticalSurface
CLEAR, group, REFLECTING, REFRACTING, refractiveIndex, surfacePoint, surfaceType
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS
 
Constructor Summary
QuadricSurface()
          Form a default QuadricSurface
QuadricSurface(double z, double c, double e, double rmax, RefractiveIndex n)
          Form an on-axis QuadricSurface with all other parameters specified.
QuadricSurface(Position p, double c, double e, double rmax, RefractiveIndex n)
          Form a QuadricSurface with all parameters specifed.
QuadricSurface(QuadricSurface s)
          Constuctor with all parameters set you specifing QuadricSurface.
 
Method Summary
 QuadricSurface clone()
          Method to clone the current QuadricSurface
 double distance(Position r, Director v)
          Method get the distance from a Position to the surface
 void draw(java.awt.Graphics2D g)
          Method to draw the surface is a Graphics2D context.
 double getCurvature()
          Method to get the surface curvature
 double getEdgePlane()
          Method to get the edge plane, being the plane at maximum radius.
 Director getNormal(Position r)
          Method to get the surface normal, at a specified point which is assumes yto be on the surface/
 double getQuadric()
          Method to get the Quadric parameter
 void scale(double a)
          Scale the surface surface
 void setCurvature(double c)
          Method to set the curvature
 void setQuadric(double e)
          Method to set the Quardic parameter
 java.lang.String toString()
          String method for formatted strings.
 
Methods inherited from class optics.OpticalPlane
getBounds, getMaxRadius, getPlaneNormal, pointInPlane, setMaxRadius, setPlaneNormal
 
Methods inherited from class optics.OpticalSurface
distance, edit, entranceAperture, exitAperture, fromString, fromTokens, getGroup, getIndex, getNormal, getPoint, getRefractiveIndex, getSurfacePoint, getSurfaceType, getSurfaceType, makeStandAlone, pointInPlane, setGroup, setRefractiveIndex, setSurfacePoint, setSurfaceType
 
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

curvature

protected double curvature
The surface curvature


epsilon

protected double epsilon
The shape factor

Constructor Detail

QuadricSurface

public QuadricSurface(double z,
                      double c,
                      double e,
                      double rmax,
                      RefractiveIndex n)
Form an on-axis QuadricSurface with all other parameters specified.

Parameters:
z - z location of surface
c - the curvature
e - the quadric parameter
rmax - the maximum radius
n - the Refractive Index

QuadricSurface

public QuadricSurface(Position p,
                      double c,
                      double e,
                      double rmax,
                      RefractiveIndex n)
Form a QuadricSurface with all parameters specifed.

Parameters:
p - the surface reference point
c - curvature
e - the quadric parameter
rmax - the maximum radius
n - the refractive index

QuadricSurface

public QuadricSurface(QuadricSurface s)
Constuctor with all parameters set you specifing QuadricSurface.

All parameters except OpticalGroup are copied.

Parameters:
s - the specifying surface

QuadricSurface

public QuadricSurface()
Form a default QuadricSurface

Method Detail

clone

public QuadricSurface clone()
Method to clone the current QuadricSurface

Overrides:
clone in class OpticalPlane
Returns:
QuadricSurface clone of current.

setCurvature

public void setCurvature(double c)
Method to set the curvature

Parameters:
c - The curvature

getCurvature

public double getCurvature()
Method to get the surface curvature

Overrides:
getCurvature in class OpticalPlane
Returns:
double the curvature

setQuadric

public void setQuadric(double e)
Method to set the Quardic parameter

Parameters:
e - the Quadric parameter

getQuadric

public double getQuadric()
Method to get the Quadric parameter

Returns:
double the quadric parameter

scale

public void scale(double a)
Scale the surface surface

Overrides:
scale in class OpticalPlane
Parameters:
a - the scale

distance

public double distance(Position r,
                       Director v)
Method get the distance from a Position to the surface

Overrides:
distance in class OpticalPlane
Parameters:
r - The ray position
v - the ray director
Returns:
double the distance to the surface

getNormal

public Director getNormal(Position r)
Method to get the surface normal, at a specified point which is assumes yto be on the surface/

Overrides:
getNormal in class OpticalPlane
Parameters:
r - The position
Returns:
Director3d the surface normal

getEdgePlane

public double getEdgePlane()
Method to get the edge plane, being the plane at maximum radius.

Overrides:
getEdgePlane in class OpticalPlane
Returns:
double the plane edge.

toString

public java.lang.String toString()
String method for formatted strings.

Overrides:
toString in class OpticalPlane

draw

public void draw(java.awt.Graphics2D g)
Method to draw the surface is a Graphics2D context.

Specified by:
draw in interface Diagram2DComponent
Overrides:
draw in class OpticalPlane
Parameters:
g - the Graphics2D