optics
Class SourcePoint

java.lang.Object
  extended by javax.vecmath.Tuple3d
      extended by javax.vecmath.Point3d
          extended by optics.Position
              extended by optics.SourcePoint
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
LambertianPoint

public class SourcePoint
extends Position

Class to implement point source being a point in 3-D with a specified spectral response in the form of a WaveLengthSpectrum

See Also:
Serialized Form

Field Summary
protected  WaveLengthSpectrum spectrum
          The Wavelegth spectrum
 
Fields inherited from class javax.vecmath.Tuple3d
x, y, z
 
Constructor Summary
SourcePoint()
          Default constructor with point at 0,0,0 of unit intensity with Green light
SourcePoint(double x, double y, double z, double brightness)
          Constructor to specify position and brightness, which results in a constant spectrum of specified brightness
SourcePoint(double x, double y, double z, WaveLengthSpectrum s)
          Constructor to specify position and spectrum
SourcePoint(javax.vecmath.Point2d pt, double z, double brightness)
          Constructor with x/y specified by a Point2d in a plane and z by the location of the plane.
SourcePoint(javax.vecmath.Point2d pt, double z, WaveLengthSpectrum s)
          Constructor with x/y specified by a Point2d and z by a double.
SourcePoint(Position p)
          Constructor to specify position with unity brightness.
SourcePoint(Position p, double brightness)
          Constructor to specify position and brightness, which results in a constant spectrum of specified brightness
SourcePoint(Position p, WaveLengthSpectrum s)
          Constructor to specify position and Spectrum class
 
Method Summary
 SourcePoint clone()
          Method to return a clone of the source Point with the Same spectrum as the current point.
 double getIntensity(Director u, double lambda)
          Method to get the intensity at specified wavelength in specified direction.
 double getIntensity(double lambda)
          Method to get the intensity at specified wavelength
 WaveLengthSpectrum getSpectrum()
          Method to get the spectral function.
 void setSpectrum(WaveLengthSpectrum s)
          Method set the spectrum
 java.lang.String toString()
          Standard toString format the location and spectrum as a String
 
Methods inherited from class optics.Position
add, direction, fromString, fromTokens, getPoint2d, length, length, lengthSquared, lengthSquared, max, min, propagate
 
Methods inherited from class javax.vecmath.Point3d
distance, distanceL1, distanceLinf, distanceSquared, project
 
Methods inherited from class javax.vecmath.Tuple3d
absolute, absolute, add, add, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, epsilonEquals, equals, equals, get, get, getX, getY, getZ, hashCode, interpolate, interpolate, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, scaleAdd, set, set, set, set, setX, setY, setZ, sub, sub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

spectrum

protected WaveLengthSpectrum spectrum
The Wavelegth spectrum

Constructor Detail

SourcePoint

public SourcePoint(double x,
                   double y,
                   double z,
                   WaveLengthSpectrum s)
Constructor to specify position and spectrum

Parameters:
x - the x locations
y - the y location
z - the z location
s - The spectrum

SourcePoint

public SourcePoint(double x,
                   double y,
                   double z,
                   double brightness)
Constructor to specify position and brightness, which results in a constant spectrum of specified brightness

Parameters:
x - the x locations
y - the y location
brightness - the brightness if the ConstantSpectrum
See Also:
ConstantSpectrum

SourcePoint

public SourcePoint(Position p,
                   WaveLengthSpectrum s)
Constructor to specify position and Spectrum class

Parameters:
p - location
s - the spectral response

SourcePoint

public SourcePoint(Position p,
                   double brightness)
Constructor to specify position and brightness, which results in a constant spectrum of specified brightness

Parameters:
p - position of source point
brightness - the brightness
See Also:
ConstantSpectrum

SourcePoint

public SourcePoint(javax.vecmath.Point2d pt,
                   double z,
                   WaveLengthSpectrum s)
Constructor with x/y specified by a Point2d and z by a double.

Parameters:
pt - point in the plane
z - the plane
s - the spectrum

SourcePoint

public SourcePoint(javax.vecmath.Point2d pt,
                   double z,
                   double brightness)
Constructor with x/y specified by a Point2d in a plane and z by the location of the plane.

Parameters:
pt - point is a plane.
z - the plane
brightness - the spectrum
See Also:
ConstantSpectrum

SourcePoint

public SourcePoint(Position p)
Constructor to specify position with unity brightness.

Parameters:
p - the source position.

SourcePoint

public SourcePoint()
Default constructor with point at 0,0,0 of unit intensity with Green light

Method Detail

clone

public SourcePoint clone()
Method to return a clone of the source Point with the Same spectrum as the current point.

Note spectrum is not cloned.

Overrides:
clone in class Position
Returns:
SourcePoint cloned point.

setSpectrum

public void setSpectrum(WaveLengthSpectrum s)
Method set the spectrum

Parameters:
s - the spectrum

getSpectrum

public WaveLengthSpectrum getSpectrum()
Method to get the spectral function.

Returns:
WaveLengthSpectrum the spectrurm.

getIntensity

public double getIntensity(double lambda)
Method to get the intensity at specified wavelength

Parameters:
lambda - the wavelength in microns
Returns:
double itnesity at specified wavelnegth.

getIntensity

public double getIntensity(Director u,
                           double lambda)
Method to get the intensity at specified wavelength in specified direction.

For simple SourcePoint the direction is ignored. This method it overloaded in entending methods where there is an directional dependance.

Parameters:
u - the ray direction
lambda - the wavelength
Returns:
double itnesity at specified wavelnegth

toString

public java.lang.String toString()
Standard toString format the location and spectrum as a String

Overrides:
toString in class javax.vecmath.Tuple3d
Returns:
String formatted string.