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.
 
 
 
 
 
 

79 lines
1.8 KiB

  1. 10 REM VERTICAL SUNDIALS
  2. 11 INPUT "LAT, LONG ";B,L
  3. 12 IF B<0 THEN 11
  4. 13 INPUT "TIME-ZONE MERIDIAN";L0
  5. 14 INPUT "AZIMUTH DIAL FACES";F
  6. 15 IF F<=90 OR F>=270 THEN 14
  7. 16 P1=3.14159265: R1=P1/180
  8. 17 B1=B*R1: S=0
  9. 18 INPUT "SUN E OR W";S$
  10. 19 IF S$="E" THEN S=-1
  11. 20 IF S$="W" THEN S=1
  12. 21 IF S=0 THEN 18
  13. 22 INPUT "DIAL HEIGHT";H5
  14. 23 INPUT "WIDTH OF THIS PART";W5
  15. 24 INPUT "STEP SIZE IN MIN";G
  16. 25 F1=P1/2+S*R1*(180-F): PRINT
  17. 26 R5=W5/H5: Z5=S*R1*(L0-L)
  18. 27 PRINT "LAT: ";B;" LONG: ";L;
  19. 28 PRINT " MERID: ";L0
  20. 29 PRINT "DIAL FACES AZIMUTH ";F
  21. 30 GOSUB 73
  22. 31 PRINT "SUN ";S$;" ";W5;
  23. 32 PRINT "WIDE BY";H5;"HIGH"
  24. 33 PRINT: H=12-S: G=S*G/60
  25. 34 REM
  26. 35 REM CALCULATING LOOP
  27. 36 Q=Z5+S*P1*(H-12)/12
  28. 37 IF Q<0 THEN 47
  29. 38 IF H<4 OR H>20 THEN 48
  30. 39 IF Q<>0 THEN 41
  31. 40 K=0: GOTO 45
  32. 41 K0=SIN(F1)*TAN(P1/2-Q)
  33. 42 K1=COS(F1)*SIN(B1)+K0
  34. 43 IF K1=0 THEN K1=1E-10
  35. 44 K=COS(B1)/K1
  36. 45 GOSUB 52
  37. 46 IF K>=0 THEN GOSUB 57
  38. 47 H=H+G: GOTO 35
  39. 48 PRINT
  40. 49 INPUT "AGAIN (Y OR N)";Q$
  41. 50 S=0: IF Q$="Y" THEN 18
  42. 51 END
  43. 52 REM DECIDE X OR Y
  44. 53 D=S*K*H5: D$=" X="
  45. 54 IF K<R5 THEN 56
  46. 55 D=-W5/K: D$=" *Y="
  47. 56 RETURN
  48. 57 REM PRINT A LINE
  49. 58 H0=H+0.002
  50. 59 H1=INT(H0): M1=INT(60*(H0-H1))
  51. 60 M1$=STR$(100+M1)
  52. 61 M1$=":"+RIGHT$(M1$,2)
  53. 62 P$=" PM "
  54. 63 IF H1<12 THEN P$=" AM "
  55. 64 IF H1<>12 THEN 66
  56. 65 IF M1=0 THEN P$=" NOON"
  57. 66 IF H1>12 THEN H1=H1-12
  58. 67 H1$=STR$(H1)
  59. 68 IF H1<10 THEN H1$=" "+H1$
  60. 69 D=INT(D*1000+0.5)/1000
  61. 70 PRINT H1$;M1$;P$;
  62. 71 PRINT TAB(15);D$;D
  63. 72 RETURN
  64. 73 REM COMPUTE END OF STYLE
  65. 74 P5=TAN(P1/2-B1)*H5
  66. 75 Z=SIN(F1)*P5
  67. 76 Z=INT(Z*1000+0.5)/1000
  68. 77 X=S*TAN(P1/2-F1)*Z
  69. 78 X=INT(X*1000+0.5)/1000
  70. 79 Y=-H5
  71. 80 PRINT "STYLE END COORDINATES:"
  72. 81 PRINT "X=";X;", Y=";Y;", Z=";Z
  73. 82 RETURN
  74. 83 REM *************************
  75. 84 REM FROM "ASTRONOMICAL COM-
  76. 85 REM PUTING," SKY & TELESCOPE
  77. 86 REM DECEMEBR, 1987
  78. 87 REM *************************