home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / basic / astrmenu.lbr / LENS.BZS / LENS.BAS
BASIC Source File  |  1987-04-26  |  1KB  |  41 lines

  1. 1 PRINT "From the November 1984 SKY & TELESCOPE, pp. 450-1."
  2. 2 PRINT
  3. 3 PRINT "This program computes the four radii of curvature on an aplanatic"
  4. 4 PRINT "lens (achromatic doublet free of spherical abberation and coma)."
  5. 5 PRINT
  6. 6 PRINT "INPUT:  Front (flint) and rear (crown) refractive indices at three"
  7. 7 PRINT "        different wavelengths, focal length of telescope (mm)."
  8. 8 PRINT
  9. 9 PRINT "OUTPUT:  Four radii of curvature (+ convex, - concave to sky)." :PRINT
  10. 10 REM APLANATIC DOUBLET DESIGN
  11. 12 REM
  12. 14 INPUT "FRONT INDICES";A,B,C
  13. 16 INPUT "REAR INDICES ";D,E,F
  14. 18 INPUT "FOCAL LENGTH ";FL
  15. 20 PRINT
  16. 22 G=B/(B-1) : H=E/(E-1)
  17. 24 I=(B-1)/(C-A) : J=(E-1)/(F-D)
  18. 26 K=I^2 : L=I^3 : M=J^2 : N=J^3
  19. 28 O=(3-2/G)*I : P=(3-2/H)*J
  20. 30 Q=(3*G-1)*K
  21. 32 R=(8-4/H)*I*J-(3*H-1)*M
  22. 34 S=(G^2)*L-(5-2/H)*K*J
  23. 36 T=(4*H-1)*I*M-(H^2)*N
  24. 38 U=(2-1/G)*I : V=(2-1/H)*J
  25. 40 W=G*K-(3-1/H)*I*J+H*M
  26. 42 X=(U^2)*P-(V^2)*O
  27. 44 Y=2*U*W*P-(V^2)*Q+U*V*R
  28. 46 Z=(W^2)*P-(V^2)*(S+T)+V*W*R
  29. 48 A1=(Y-SQR(Y^2-4*X*Z))/(2*X)
  30. 50 A2=(U*A1)/V-W/V
  31. 52 R1=((I-J)/A1)*FL
  32. 54 R2=((I-J)/(A1-(I*(G-1))))*FL
  33. 56 R3=((I-J)/A2)*FL
  34. 58 R4=((I-J)/(A2+(J*(H-1))))*FL
  35. 60 PRINT "R1 = ";R1
  36. 62 PRINT "R2 = ";R2
  37. 64 PRINT "R3 = ";R3
  38. 66 PRINT "R4 = ";R4
  39. 68 RUN"ASTRMENU.BAS"
  40. /(A2+(J*(H-1))))*FL
  41. 60 PRINT "R1 =