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.
 
 
 
 
 
 

78 lines
3.0 KiB

  1. 10 REM - THIS IS FACECIRC.BAS
  2. 20 CLS
  3. 30 REM - Constants
  4. 40 A = 4080: C = 5100: HF = 180: PLU = 40: E = 80: FA = 1: FB = 10: FC = 350
  5. 50 K = .017453293#: REM - This is PI/180
  6. 60 INPUT "Please Enter the Outside DIAMETER in MM - "; DIA: OR1 = DIA / 2: PRINT : PRINT
  7. 70 IR1 = OR1 - 3: PRINT : PRINT
  8. 80 IR2 = IR1 - 2: IR3 = IR1 - 1
  9. 90 REM - Radius is converted to plotter units (PLU)
  10. 100 OR2 = OR1 * PLU: IR4 = IR1 * PLU: IR5 = IR2 * PLU: IR6 = IR3 * PLU
  11. 110 PRINT : PRINT "Do you want the scale in Degrees or Hours and Minutes?"
  12. 120 INPUT " Please indicate 'd' for Degrees or 'h' for Hours... "; A$: PRINT
  13. 130 IF A$ = "h" OR A$ = "H" THEN QQ = 1
  14. 140 REM - Clear, set into HP-GL/2 mode, and initialize the printer
  15. 150 LPRINT CHR$(27); "E" : LPRINT CHR$(27); "%0B" : LPRINT "IN;"
  16. 160 REM - Select a pen and set the width
  17. 170 LPRINT "SP1;": LPRINT "PW.1;"
  18. 180 PRINT : PRINT : PRINT "Printing......."
  19. 190 PRINT : PRINT "NOTE: This will take up to 70 seconds to print."
  20. 200 REM - Plot outside and inside circles
  21. 210 LPRINT "PA"; A; ","; C; ";": LPRINT "CI"; OR2; : LPRINT "PU;"
  22. 220 LPRINT "PA"; A; ","; C; ";": LPRINT "CI"; IR4; : LPRINT "PU;"
  23. 230 REM - Put in the Degrees or Hours
  24. 240 IF QQ = 1 THEN FA = 1.25
  25. 250 FOR I = -HF TO HF STEP FA
  26. 260 LPRINT "PU;"
  27. 270 LPRINT "PA"; A + SIN(I * K) * IR4; ","; C + COS(I * K) * IR4; ";"
  28. 280 LPRINT "PD;"
  29. 290 LPRINT "PA"; A + SIN(I * K) * OR2; ","; C + COS(I * K) * OR2; ";"
  30. 300 LPRINT "PU;"
  31. 310 NEXT I
  32. 320 REM - Put in longer tick marks
  33. 330 IF QQ = 1 THEN FB = 15
  34. 340 FOR I = -HF TO HF STEP FB
  35. 350 LPRINT "PU;"
  36. 360 LPRINT "PA"; A + SIN(I * K) * IR5; ","; C + COS(I * K) * IR5; ";"
  37. 370 LPRINT "PD;"
  38. 380 LPRINT "PA"; A + SIN(I * K) * OR2; ","; C + COS(I * K) * OR2; ";"
  39. 390 LPRINT "PU;"
  40. 400 NEXT I
  41. 410 REM - Put in shorter tick marks
  42. 420 FOR I = -HF TO HF STEP 5
  43. 430 LPRINT "PU;"
  44. 440 LPRINT "PA"; A + SIN(I * K) * IR6; ","; C + COS(I * K) * IR6; ";"
  45. 450 LPRINT "PD;"
  46. 460 LPRINT "PA"; A + SIN(I * K) * OR2; ","; C + COS(I * K) * OR2; ";"
  47. 470 LPRINT "PU;"
  48. 480 NEXT I
  49. 490 REM - Select Font and Label
  50. 500 LPRINT "SD1,21,2,1,4,8,7,4148;"
  51. 510 IF QQ = 1 THEN GOTO 530
  52. 520 IF OR1 < 45 THEN LPRINT "DV1;"
  53. 530 LPRINT "DT*,1;"
  54. 540 LPRINT "SS;"
  55. 550 LPRINT "LO16;"
  56. 560 IF QQ = 1 THEN FC = 345: FB = 15
  57. 570 FOR J = 0 TO FC STEP FB
  58. 580 LPRINT "PU;"
  59. 590 IF QQ = 1 THEN GOTO 610
  60. 600 IF OR1 < 45 THEN LPRINT "PA"; A + SIN(J * K) * (IR5 + E); ","; C + COS(J * K) * (IR5 + E); ";": GOTO 620
  61. 610 LPRINT "PA"; A + SIN(J * K) * IR5; ","; C + COS(J * K) * IR5; ";"
  62. 620 LPRINT "DI"; COS(-J * K); ","; SIN(-J * K); ";"
  63. 630 IF J = 90 THEN LPRINT "DI0,-1;"
  64. 640 IF J = 180 THEN LPRINT "DI-1,0;"
  65. 650 IF J = 270 THEN LPRINT "DI0,1;"
  66. 660 IF QQ = 1 THEN LPRINT "LB"; INT(J / 15); "*;": GOTO 680
  67. 670 LPRINT "LB"; INT(J); "*;"
  68. 680 LPRINT "PU;"
  69. 690 NEXT J
  70. 700 REM - Reset the printer
  71. 710 LPRINT CHR$(27); "%0A": LPRINT CHR$(27); "E"
  72. 720 END
  73. 900 REM ***********************************************
  74. 910 REM THIS PROGRAM BY RONALD KOCELA PRODUCES CIRCULAR
  75. 920 REM SETTING CIRCLES ON HP LASERJET PRINTERS.
  76. 930 REM FROM SKY & TELESCOPE, MARCH 1996, PAGE 84.
  77. 940 REM ***********************************************