Skip to content
Snippets Groups Projects
Select Git revision
  • 6e4da982f7fc310551a3e2917c644ee1df9b58e5
  • master default protected
  • fix_Makefile.mingw#2
  • update_Makefile.mingw
  • fix_Makefile.mingw
  • fix_API_for_C_apps
  • fix_procinfo_mac
  • boinccmd_gpu_mode_always_until_sigterm
  • fgrp_osx_hotfix
  • fix_boinc_master@f8250782
  • eah_wrapper_improvements
  • diagnostics_win-hotfix
  • diagnostics_win-hotfix-old
  • current_fgrp_apps
  • testing_gw_apps
  • gw_app_darwin_15
  • current_brp_apps
  • current_brp_apps_android10
  • current_gfx_apps
  • current_server
  • current_gw_apps
  • previous_fgrp_apps
  • previous_gw_apps
  • testing_brp_apps
  • apps_FGRP3_1.07
  • apps_FGRP3_1.08
26 results

graphics_lib.h

Blame
  • ABCD.py 410 B
    import numpy as np
    
    def apply(ABCD, q1, n1, n2):
        return n2 * (ABCD[0,0] * q1/n1 + ABCD[0,1]) / (ABCD[1,0] * q1/n1 + ABCD[1,1])
    
    def mirror_trans(n1, n2, Rc):
        return np.matrix([[1,0],[(n2-n1)/Rc,1]])
        
    def mirror_refl(n, Rc):
        return np.matrix([[1,0],[-2*n/Rc,1]])
        
    def space(n,L):
        return np.matrix([[1, L/n],[0,1]])
        
    def lens(f):
        return np.matrix([[1, 0],[-1/f,1]])