ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

74 lines
1.5 KiB

  1. 10 REM DIFFRACTION PATTERN
  2. 20 REM
  3. 40 DIM II(40,24),AA(40,24),BB(40,24)
  4. 50 R=3: REM 6-INCH APERTURE
  5. 60 L=.000022: REM WAVELENGTH
  6. 70 GOSUB 530
  7. 80 INPUT "HOW MANY RAYS";H
  8. 90 FOR I1=1 TO H
  9. 100 X=R*(2*RND-1)
  10. 110 Y=R*(2*RND-1)
  11. 115 REM NOTE THAT THE RND STATEMENT OPERATES
  12. 117 REM DIFFERENTLY ON DIFFERENT MACHINES
  13. 120 GOSUB 390
  14. 130 IF F=0 THEN 100
  15. 140 PRINT "DOING RAY ";I1
  16. 150 GOSUB 450
  17. 160 NEXT
  18. 170 REM
  19. 180 PRINT "NOW FINDING INTENSITY"
  20. 190 C=II(20,12)^2
  21. 200 FOR I=0 TO 40: FOR J=0 TO 24
  22. 210 II(I,J)=II(I,J)*II(I,J)/C
  23. 220 NEXT J: NEXT I
  24. 230 REM
  25. 240 REM PRINT PICTURE
  26. 250 REM
  27. 260 INPUT "PRINTER ON";Q$
  28. 270 I$=" ./:;XH8M#": GOSUB 620
  29. 280 FOR J=0 TO 24: LPRINT "I";
  30. 290 FOR I=0 TO 40
  31. 300 V=INT(9.99*II(I,J)^.47)+1
  32. 310 LPRINT MID$(I$,V,1);
  33. 320 NEXT I
  34. 330 LPRINT "I": NEXT J
  35. 340 GOSUB 620
  36. 350 LPRINT
  37. 360 LPRINT "1 ARC SEC: I---------I"
  38. 370 GOTO 720
  39. 380 REM
  40. 390 REM APERTURE FILTER
  41. 400 REM
  42. 410 F=1
  43. 420 R1=SQR(X*X+Y*Y)
  44. 430 IF R1>R THEN F=0
  45. 440 RETURN
  46. 450 REM PHASE CALCULATION
  47. 460 REM
  48. 470 FOR I=0 TO 40
  49. 480 FOR J=0 TO 24
  50. 490 P=X*AA(I,J)+Y*BB(I,J)
  51. 500 II(I,J)=II(I,J)+COS(P)
  52. 510 NEXT J: NEXT I
  53. 520 RETURN
  54. 530 REM COMPUTE COEFFICIENTS
  55. 540 REM
  56. 550 K=2*3.14159265#/(L*206265!)
  57. 560 FOR I=0 TO 40: FOR J=0 TO 24
  58. 570 AA(I,J)=K*(I-20)/10
  59. 580 BB(I,J)=K*(12-J)/6
  60. 590 NEXT J: NEXT I
  61. 600 RETURN
  62. 610 REM
  63. 620 REM PRINT A LINE
  64. 630 LPRINT " ";
  65. 640 FOR I=0 TO 40: LPRINT "-";
  66. 650 NEXT: LPRINT
  67. 660 RETURN
  68. 670 REM =======================
  69. 680 REM FROM "ASTRONOMICAL
  70. 690 REM COMPUTING," SKY & TELE-
  71. 700 REM SCOPE, SEPTEMBER, 1987
  72. 710 REM =======================
  73. 720 END