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.

pillar.bas 1.2 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 10 REM PILLAR.BAS by Rodney Kubesh
  2. 20 SCREEN 12
  3. 30 REM Set Theta, the maximum angle of crystal tilt
  4. 40 TH = 4
  5. 50 REM Sun angle Alpha, varied from 6 deg.
  6. 60 REM above horizon to 6 deg. below horizon
  7. 70 FOR I = 0 TO 12
  8. 80 A = 6 - I
  9. 90 REM Calculate sky color
  10. 100 B& = 63 * (1 - .06 * I) : REM Blue
  11. 110 G& = 40 * (1 - .06 * I) : REM Green
  12. 120 R& = 45 * (1 - .06 * I) : REM Red
  13. 130 PALETTE 3, B& * 65536 + G& * 256 + R&
  14. 140 PAINT (320, 320), 3
  15. 150 IF A >= 0 THEN
  16. 160 HI = 2 * TH - A
  17. 170 LO = -(2 * TH + A)
  18. 180 END IF
  19. 190 IF A < 0 THEN
  20. 200 HI = 2 * TH + ABS(A)
  21. 210 LO = ABS(A) - 2 * TH
  22. 220 END IF
  23. 230 FOR AN = LO TO HI STEP .5
  24. 240 REM Draw the Sun
  25. 250 SU = 450 - (1000 * TAN(A * 3.14159 / 180))
  26. 260 CIRCLE (320, SU), 10, 1
  27. 270 PAINT (320, SU), 1, 1
  28. 280 SP = 450 - (1000 * TAN(AN * 3.14159 / 180))
  29. 290 PALETTE 1, 334143
  30. 300 CIRCLE (320, SP), 3, 1
  31. 310 PAINT (320, SP), 1, 1
  32. 320 REM Draw the ground
  33. 330 LINE (0, 450)-(639, 480), , BF
  34. 340 NEXT AN
  35. 350 REM Hold screen for one second, then clear it
  36. 360 SLEEP 1
  37. 370 IF I < 12 THEN CLS
  38. 380 NEXT I
  39. 390 END
  40. 900 REM ---------------------------
  41. 910 REM APPEARED IN ASTRONOMICAL
  42. 920 REM COMPUTING, SKY & TELESCOPE,
  43. 930 REM MAY 1999, PAGE 70
  44. 940 REM ---------------------------