System4f.traceThrough

raytracing.System4f.traceThrough(self, inputRay)

Contrary to trace(), this only returns the last ray. Mutiplying the ray by the transfer matrix will give the correct ray but will not consider apertures. By “tracing” a ray, we do consider all apertures in the system.

Parameters:

inputRay (object of Ray class) – A ray at height y and angle theta

Returns:

rayTrace – The height and angle of the last ray after propagating through the system, including apertures.

Return type:

object of Ray class

Examples

>>> from raytracing import *
>>> # M is an ABCD matrix of a lens (f=10)
>>> M= Matrix(A=1,B=0,C=-1/10,D=1,physicalLength=2,label='Lens')
>>> # R1 is a ray
>>> R1=Ray(y=5,theta=20)
>>> Tr=M.traceThrough(R1)
>>> print('the height of traced ray is' , Tr.y,  'and the angle is', Tr.theta)
the height of traced ray is 5.0 and the angle is 19.5

Notes

If a ray is blocked, its property isBlocked will be true, and isNotBlocked will be false.