DECLARE FUNCTION ASIN! (x) DECLARE SUB pager () 100 PRINT CHR$(12) pi = 4! * ATN(1) 105 PRINT "FRESNEL'S FORMULAS" 110 PRINT 120 PRINT " Let a ray of light be incident from a medium of index n1 onto" 125 PRINT "a plane surface that separates it from a medium of n2. The incident" 130 PRINT "angle be 01, the reflected angle = 01' & the refracted angle is 02" 131 PRINT 135 PRINT " The incident ray may be either s or p polarization, that is," 140 PRINT " s - polarized has the E vector parallel to the surface" 145 PRINT " or" 150 PRINT " p - polarized has the H vector parallel to the surface." 160 PRINT " This program is designed to evaluate the reflection & transmission" 165 PRINT " properties of nonconducting media via an evaluation of the FRESNEL" 170 PRINT " coefficient, r and t. Other programs in the OPTICS SERIES (See HELP" 175 PRINT " PHYS), evaluate these functions for many angles and provide" 180 PRINT " graphical display of the results." 190 CALL pager 200 PRINT "Input indicies of refraction n1 and n2? [ n1 <0 STOPS program]" 210 INPUT n1, n2 211 IF n1 < 0 THEN STOP 215 IF n1 >= 1! AND n2 >= 1! THEN GOTO 300 220 PRINT "n1 and n2 must both be > 1." 230 GOTO 200 300 PRINT "Input in degrees the incident angle, 01?" 305 INPUT ang1 306 theta1 = ang1 * pi / 180! 310 theta2 = ASIN((n1 / n2) * SIN(theta1)) 320 ang2 = theta2 * 180 / pi 325 PRINT "The refractive angle is "; ang2; " degrees." 350 PRINT "Input the state of polarization? (s or p)?" 360 INPUT P$ 370 IF P$ = "s" THEN 400 380 IF P$ = "p" THEN 500 390 GOTO 350 400 REM s polarization 405 r12s = SIN(theta2 - theta1) / SIN(theta2 + theta1) 406 R = r12s ^ 2 410 t12s = 2! * COS(theta1) * SIN(theta2) / SIN(theta2 + theta1) 420 PRINT "RESULTS: r12s ="; r12s; " t12s = "; t12s 430 PRINT " R= r**2 = the REFLECTANCE." 440 PRINT " R = "; R 441 PRINT " The TRANSMITANCE is NOT t**2!!! But is 1-R for nonconducting media." 442 PRINT " For s polarization, T (s) is given by" 446 PRINT " n2 cos(02) 2" 448 PRINT " T (s) = --------------- t12s" 450 PRINT " n1 cos(01)" 460 PRINT 462 T = ((n2 * COS(theta2)) / (n1 * COS(theta1))) * t12s ^ 2 464 PRINT "T for s = "; T 466 PRINT "R+T="; R + T 470 CALL pager 472 GOTO 200 500 REM 501 REM p polarization 505 r12p = TAN(theta1 - theta2) / TAN(theta2 + theta1) 506 R = r12p ^ 2 507 t12p = COS(theta1) * SIN(theta2) / (SIN(theta2 + theta1) * COS(theta1 - theta2)) 508 t12p = 2! * t12p 520 PRINT "RESULTS: r12p ="; r12s; " t12p = "; t12p 530 PRINT " R= r**2 = the REFLECTANCE." 540 PRINT " R = "; R 541 PRINT " The TRANSMITANCE is NOT t**2!!! But is 1-R for nonconducting media." 542 PRINT " For p polarization, T (p) is given by" 546 PRINT " n2 cos(02) 2" 548 PRINT " T (p) = --------------- t12p" 550 PRINT " n1 cos(01)" 560 PRINT 562 T = ((n2 * COS(theta2)) / (n1 * COS(theta1))) * t12p ^ 2 564 PRINT "T for p = "; T 566 PRINT "R+T="; R + T 570 CALL pager 572 GOTO 200 610 END FUNCTION ASIN (x) ASIN = ATN(x / SQR(1 - x ^ 2)) END FUNCTION 600 SUB pager 602 PRINT , "Push RETURN to continue." 604 INPUT dum$ 606 PRINT CHR$(12) END SUB