| |
- Surface
-
- FlatSurface
-
- OpticalPlane
-
- CircularAperture
-
- IrisAperture
- ImagePlane
- QuadricSurface
-
- ParabolicSurface
- SphericalSurface
-
- SphericalImagePlane
class CircularAperture(OpticalPlane) |
|
Class to implement a circular aperture of fixed radius, rays outside the aperure
will be blocked. |
|
- Method resolution order:
- CircularAperture
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pt_or_z=0.0, radius=1.0)
- Constuctor for a circular aperture
param pt Position, the plane reference point
param radius the radius of the aperture (deafults = 1.0)
- __repr__(self)
- Implement the repr()
- draw(self)
- Draw the aperture wih two small chevrons
- getNormal(self, pos)
- Method to get normal at specifed point, this will block rays outside the aperture
- scale(self, a)
- Scale aperture, will scale position and radius. if a < 0, then abs(a) is used.
param a the scale parameter.
Methods inherited from OpticalPlane:
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from FlatSurface:
- getDistance(self, r, u)
- Get the distance from specifed Postition to the surface
param r the position
param u the director
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
|
class FlatSurface(Surface) |
|
Class to implement an Flat Surface wth specifed surface normal |
|
Methods defined here:
- __init__(self, pt=ray.Position(0.0000e+00 , 0.0000e+00, 0.0000e+00), normal=ray.Director(0.0000e+00 , 0.0000e+00, 1.0000e+00), type=0, refindex=None)
- Constructor
param pt Position, reference point, (defaults to (0,0,0))
param normal Director, the surface normal
param type int (defaults to Clear)
param refindex the refractive index (defaults to None)
- getDistance(self, r, u)
- Get the distance from specifed Postition to the surface
param r the position
param u the director
- getNormal(self, pt)
- Get surface normal at any point.
Methods inherited from Surface:
- __repr__(self)
- Implement the repr() method
- draw(self)
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
- scale(self, a)
- Scale surface
|
class ImagePlane(OpticalPlane) |
|
Class to form an image plane (either input or output) of specific loation and size |
|
- Method resolution order:
- ImagePlane
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pt, xsize=36.0, ysize=24.0)
- Constructor for Output plans
- __repr__(self)
- Implement repr()
- __str__(self)
- Implement str()
- draw(self)
- Define Draw plane of correct height parameter.
- scale(self, a)
- Scale plane, scales both position and size, if a < 0,abs(a) is used.
param a the scale parameter.
- setSize(self, x, y)
- Set the size of plane but without scaling ploation point
Methods inherited from OpticalPlane:
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from FlatSurface:
- getDistance(self, r, u)
- Get the distance from specifed Postition to the surface
param r the position
param u the director
- getNormal(self, pt)
- Get surface normal at any point.
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
|
class IrisAperture(CircularAperture) |
|
Class to implement a variable radius circular aperture. |
|
- Method resolution order:
- IrisAperture
- CircularAperture
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pt_or_z, radius=1.0, ratio=1.0)
- Constuctor for a iris aperture, being a variable radius circular aperture
param pt Position, the plane reference point
param radius float the radius of the aperture (deafults = 1.0)
parar ratio float fration that aperture is open
- __repr__(self)
- Implement the repr()
- draw(self)
- Draw the aperture, same as aperure but with extra bars to mark current radius
- getNormal(self, pos)
- Method to get normal at specifed point,
Methods inherited from CircularAperture:
- scale(self, a)
- Scale aperture, will scale position and radius. if a < 0, then abs(a) is used.
param a the scale parameter.
Methods inherited from OpticalPlane:
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from FlatSurface:
- getDistance(self, r, u)
- Get the distance from specifed Postition to the surface
param r the position
param u the director
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
|
class OpticalPlane(FlatSurface) |
|
Class to implement a flat optical place normal to the optical, this is simpler and
version of FlatSurface with a fixed normal axis. |
|
- Method resolution order:
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pt_or_z, type=0, refindex=None)
- __repr__(self)
- Implement the repr() method
- draw(self, height=10.0)
- Define Draw with exita height parameter.
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from FlatSurface:
- getDistance(self, r, u)
- Get the distance from specifed Postition to the surface
param r the position
param u the director
- getNormal(self, pt)
- Get surface normal at any point.
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
- scale(self, a)
- Scale surface
|
class ParabolicSurface(QuadricSurface) |
|
Method to implement a parabolic surface determined by curvature and. This is a QudaricSurface
with epsilon = 0.0 |
|
- Method resolution order:
- ParabolicSurface
- QuadricSurface
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pos, curve, maxRadius, index=None)
- Constructor
param pos the plane reference point
param curve the curvature
param maxRadius the maxradius
index the Refratcive index
- __repr__(self)
- Implement repr() for the surface
Methods inherited from QuadricSurface:
- draw(self)
- Method to draw surface in matplotlinb plot which is returned
- eccentricity(self)
- Method to get the eccentricity of the surface, not this uniques measures as it depend on the
sign of epsilon, only of historical use.
- edgePlane(self)
- Get the plane at the edge of the surface,it will fail with ValueError
if this is an impossible surface that has no edge....
- getDistance(self, r, u)
- Method to get the distance from r in direction u
to the surface
param r the point in space
param u the director at that point
return the distance to the surface
- getNormal(self, r)
- Method to get the surface normal at point r on the surface
param r the point on the surface
return Director, the surface normal
- scale(self, a)
- Scale surface, this will scale the position of the OpticalPlane, the
maxradius and the curvature. If a < 0, then abs(a) will be applied to the plane
and radius, but the sign of the curfature will be reversed.
param a the scale factor
Methods inherited from OpticalPlane:
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
|
class QuadricSurface(OpticalPlane) |
|
Method to implement a quadric surface determined by curvature and epsilon, the qudric factor |
|
- Method resolution order:
- QuadricSurface
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pos, curve, epsilon, maxRadius, index=None)
- Constructor
param pos the plane reference point
param curve the curcature
param epsilon the quadric parameter
param maxRadius the maxradius
index the Refratcive index. If present, surface is refracting, if None
it is reflecting.
- draw(self)
- Method to draw surface in matplotlinb plot which is returned
- eccentricity(self)
- Method to get the eccentricity of the surface, not this uniques measures as it depend on the
sign of epsilon, only of historical use.
- edgePlane(self)
- Get the plane at the edge of the surface,it will fail with ValueError
if this is an impossible surface that has no edge....
- getDistance(self, r, u)
- Method to get the distance from r in direction u
to the surface
param r the point in space
param u the director at that point
return the distance to the surface
- getNormal(self, r)
- Method to get the surface normal at point r on the surface
param r the point on the surface
return Director, the surface normal
- scale(self, a)
- Scale surface, this will scale the position of the OpticalPlane, the
maxradius and the curvature. If a < 0, then abs(a) will be applied to the plane
and radius, but the sign of the curfature will be reversed.
param a the scale factor
Methods inherited from OpticalPlane:
- __repr__(self)
- Implement the repr() method
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
|
class SphericalImagePlane(SphericalSurface) |
|
Special spherical image plane to deal with the humen eye model |
|
- Method resolution order:
- SphericalImagePlane
- SphericalSurface
- QuadricSurface
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pos, curve, maxRadius)
- Paramteters of surface
param pos position, either float or Position
param curve the curvature
param maxRadius maxradius of the surface
- __repr__(self)
- Implement repr() for the surface
Methods inherited from QuadricSurface:
- draw(self)
- Method to draw surface in matplotlinb plot which is returned
- eccentricity(self)
- Method to get the eccentricity of the surface, not this uniques measures as it depend on the
sign of epsilon, only of historical use.
- edgePlane(self)
- Get the plane at the edge of the surface,it will fail with ValueError
if this is an impossible surface that has no edge....
- getDistance(self, r, u)
- Method to get the distance from r in direction u
to the surface
param r the point in space
param u the director at that point
return the distance to the surface
- getNormal(self, r)
- Method to get the surface normal at point r on the surface
param r the point on the surface
return Director, the surface normal
- scale(self, a)
- Scale surface, this will scale the position of the OpticalPlane, the
maxradius and the curvature. If a < 0, then abs(a) will be applied to the plane
and radius, but the sign of the curfature will be reversed.
param a the scale factor
Methods inherited from OpticalPlane:
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
|
class SphericalSurface(QuadricSurface) |
|
Method to implement a spherical surface determined by curvature and,this is a QuadricSurface
with epsilon = 1.0 |
|
- Method resolution order:
- SphericalSurface
- QuadricSurface
- OpticalPlane
- FlatSurface
- Surface
Methods defined here:
- __init__(self, pos, curve, maxRadius, index=None)
- Constructor
param pos the plane reference point, may be Position of float
param curve the curvature
param maxRadius the maximum radius
index the Refractive index
- __repr__(self)
- Implement repr() for the surface
Methods inherited from QuadricSurface:
- draw(self)
- Method to draw surface in matplotlinb plot which is returned
- eccentricity(self)
- Method to get the eccentricity of the surface, not this uniques measures as it depend on the
sign of epsilon, only of historical use.
- edgePlane(self)
- Get the plane at the edge of the surface,it will fail with ValueError
if this is an impossible surface that has no edge....
- getDistance(self, r, u)
- Method to get the distance from r in direction u
to the surface
param r the point in space
param u the director at that point
return the distance to the surface
- getNormal(self, r)
- Method to get the surface normal at point r on the surface
param r the point on the surface
return Director, the surface normal
- scale(self, a)
- Scale surface, this will scale the position of the OpticalPlane, the
maxradius and the curvature. If a < 0, then abs(a) will be applied to the plane
and radius, but the sign of the curfature will be reversed.
param a the scale factor
Methods inherited from OpticalPlane:
- surfaceVector(self, pos)
- Method to get the Vector2d from the reference point to the specifed position, assumed to
be in the plane.
Methods inherited from Surface:
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
|
class Surface |
|
Base class for an arbitrary surface, need to be extended to be useful. |
|
Methods defined here:
- __init__(self, pt, type, refindex=None)
- Basic constructor to form a basic suurface
param pt Position, the surface reference point
param type int , the surface type
param refindex the refrative index to the right of the surface (default to None)
- __repr__(self)
- Implement the repr() method
- draw(self)
- getNormal(self, pt)
- Abstract class to get normal at specified point which is assume to
be on the surface.
- getPoint(self)
- Method to get the surface point in global coordinates taking account
that the Surface my belong to an OpticalGroup
return Vector3d the reference point
- makeStandAlone(self)
- Method to make the Surface standalone, it is removed from any OpticalGroup
and the reference point is re-set.
- scale(self, a)
- Scale surface
| |