rayoptics.elem.transform module

Useful transforms for processing sequential models

forward_transform(s1, zdist, s2)[source]

generate transform rotation and translation from s1 coords to s2 coords

reverse_transform(s1, zdist, s2)[source]

generate transform rotation and translation from s2 coords to s1 coords

cascade_transform(r_prev, t_prev, r_seg, t_seg)[source]

take the seg transform and cascade it with the prev transform

transfer_coords(r_seg, t_seg, pt_s1, dir_s1)[source]

take p and d in s1 coords of seg and transfer them to s2 coords

transform_before_surface(interface, ray_seg)[source]

Transform ray_seg from interface to previous seg.

Parameters:
  • interface – the :class:’~seq.interface.Interface’ for the path sequence

  • ray_seg – ray segment exiting from interface

Returns:

(b4_pt, b4_dir)

  • b4_pt - ray intersection pt wrt following seg

  • b4_dir - ray direction cosine wrt following seg

transform_after_surface(interface, ray_seg)[source]

Transform ray_seg from interface to following seg.

Parameters:
  • interface – the :class:’~seq.interface.Interface’ for the path sequence

  • ray_seg – ray segment exiting from interface

Returns:

(b4_pt, b4_dir)

  • b4_pt - ray intersection pt wrt following seg

  • b4_dir - ray direction cosine wrt following seg