System4f.focusPositions
- raytracing.System4f.focusPositions(self, z)
Positions of both focal points on either side of the element.
The front and back focal spots will be different if the index of refraction is different on both sides.
- Parameters:
z (float) – Position from where the positions are calculated
- Returns:
focusPositions – An array of front focal position and the back focal position.
- Return type:
array
Examples
>>> from raytracing import * >>> # M1 is an ABCD matrix of a lens (f=5) >>> M1= Matrix(A=1,B=0,C=-1/5,D=1,physicalLength=4,frontVertex=-1,backVertex=5,label='Lens') >>> Position0=M1.focusPositions(z=0) >>> print('focal positions (F,B):' , Position0) focal positions (F,B): CardinalPoint(z1=-5.0, z2=9.0)
And if we move object 2 units:
>>> Position2=M1.focusPositions(z=2) >>> print('focal positions (F,B):' , Position2) focal positions (F,B): CardinalPoint(z1=-3.0, z2=11.0)