Author Topic: Star Backgound  (Read 32695 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Star Backgound
« Reply #90 on: August 19, 2019, 02:53:48 am »
Here is a much nicer version. The planets stay appeared until right before they go behind the Sun. I also made Saturn look better.

Code: QB64: [Select]
  1. 'Ken G. made thie program on August 18, 2019,
  2. 'Thank you to STxAxTIC on the QB64.org forum for a little bit of help with The Moon orbit!
  3.  
  4. _TITLE "Solar System Simulator by Ken G. Use Mouse Over Planets, Mouse Wheel to Zoom, and Up and Down Arrow Keys To Tilt."
  5. SCREEN _NEWIMAGE(800, 600, 32)
  6. DIM z(10)
  7. mercury = 0.241
  8. venus = 0.6152
  9. mars = 1.8809
  10. jupiter = 11.8618
  11. saturn = 29.457
  12. uranus = 84.0205
  13. neptune = 164.8
  14. angle = 180
  15. tilt = 1
  16. one:
  17. _LIMIT 500
  18. mouseWheel = 0
  19.     mouseX = _MOUSEX
  20.     mouseY = _MOUSEY
  21.     mouseLeftButton = _MOUSEBUTTON(1)
  22.     mouseRightButton = _MOUSEBUTTON(2)
  23.     mouseMiddleButton = _MOUSEBUTTON(3)
  24.     mouseWheel = mouseWheel + _MOUSEWHEEL
  25. IF mouseWheel < 0 THEN angle = angle - 10
  26. IF mouseWheel > 0 THEN angle = angle + 10
  27.  
  28. IF mouseX > 385 AND mouseX < 415 AND mouseY > 285 AND mouseY < 315 THEN LOCATE 2, 49: PRINT "Sun    "
  29. IF mouseX > x1 - 15 AND mouseX < x1 + 15 AND mouseY > y1 - 15 AND mouseY < y1 + 15 THEN LOCATE 2, 49: PRINT "Mercury"
  30. IF mouseX > x2 - 15 AND mouseX < x2 + 15 AND mouseY > y2 - 15 AND mouseY < y2 + 15 THEN LOCATE 2, 49: PRINT "Venus  "
  31. IF mouseX > x - 15 AND mouseX < x + 15 AND mouseY > y - 15 AND mouseY < y + 15 THEN LOCATE 2, 49: PRINT "Earth  "
  32. IF mouseX > x3 - 15 AND mouseX < x3 + 15 AND mouseY > y3 - 15 AND mouseY < y3 + 15 THEN LOCATE 2, 49: PRINT "Mars   "
  33. IF mouseX > x5 - 15 AND mouseX < x5 + 15 AND mouseY > y5 - 15 AND mouseY < y5 + 15 THEN LOCATE 2, 49: PRINT "Jupiter"
  34. IF mouseX > x6 - 15 AND mouseX < x6 + 15 AND mouseY > y6 - 15 AND mouseY < y6 + 15 THEN LOCATE 2, 49: PRINT "Saturn "
  35. IF mouseX > x7 - 15 AND mouseX < x7 + 15 AND mouseY > y7 - 15 AND mouseY < y7 + 15 THEN LOCATE 2, 49: PRINT "Uranus "
  36. IF mouseX > x8 - 15 AND mouseX < x8 + 15 AND mouseY > y8 - 15 AND mouseY < y8 + 15 THEN LOCATE 2, 49: PRINT "Neptune"
  37.  
  38. a$ = INKEY$
  39. IF a$ = CHR$(27) THEN END
  40. IF a$ = CHR$(0) + CHR$(72) THEN tilt = tilt + 1
  41. IF a$ = CHR$(0) + CHR$(80) THEN tilt = tilt - 1
  42. IF angle > 360 THEN angle = 360
  43. IF angle < 10 THEN angle = 10
  44. IF tilt > 50 THEN tilt = 50
  45. IF tilt < 1 THEN tilt = 1
  46. seconds = seconds + .01
  47. s1 = (60 - seconds) * 6 + 180 / mercury
  48. s2 = (60 - seconds) * 6 + 180 / venus
  49. s3 = (60 - seconds) * 6 + 180 'Earth and Moon
  50. s4 = (60 - seconds) * 6 + 180 / mars
  51. s5 = (60 - seconds) * 6 + 180 / jupiter
  52. s6 = (60 - seconds) * 6 + 180 / saturn
  53. s7 = (60 - seconds) * 6 + 180 / uranus
  54. s8 = (60 - seconds) * 6 + 180 / neptune
  55.  
  56.  
  57. 'Mercury
  58. oldx1 = x1
  59. x1 = INT(SIN(s1 / 45 * 3.141592) * angle / 4) + 400
  60. y1 = INT(COS(s1 / 45 * 3.141592) * (angle / 4) / tilt) + 300
  61.  
  62. 'Venus
  63. oldx2 = x2
  64. x2 = INT(SIN(s2 / 90 * 3.141592) * angle / 2) + 400
  65. y2 = INT(COS(s2 / 90 * 3.141592) * (angle / 2) / tilt) + 300
  66.  
  67. 'Earth
  68. oldx = x
  69. x = INT(SIN(s3 / 180 * 3.141592) * angle) + 400
  70. y = INT(COS(s3 / 180 * 3.141592) * angle / tilt) + 300
  71.  
  72. 'Mars
  73. oldx3 = x3
  74. x3 = INT(SIN(s4 / 270 * 3.141592) * angle * 1.5) + 400
  75. y3 = INT(COS(s4 / 270 * 3.141592) * (angle * 1.5) / tilt) + 300
  76.  
  77. 'Moon
  78. x4 = INT(SIN(19 * s3 / 270 * 3.141592) * angle / 10) + x
  79. y4 = INT(COS(19 * s3 / 270 * 3.141592) * (angle / 10) / tilt) + y
  80.  
  81. 'Outer Planets
  82. 'Jupiter
  83. oldx5 = x5
  84. x5 = INT(SIN(s5 / 450 * 3.141592) * angle * 3) + 400
  85. y5 = INT(COS(s5 / 450 * 3.141592) * (angle * 3) / tilt) + 300
  86.  
  87. 'Saturn
  88. oldx6 = x6
  89. x6 = INT(SIN(s6 / 630 * 3.141592) * angle * 4.5) + 400
  90. y6 = INT(COS(s6 / 630 * 3.141592) * (angle * 4.5) / tilt) + 300
  91.  
  92. 'Uranus
  93. oldx7 = x7
  94. x7 = INT(SIN(s7 / 810 * 3.141592) * angle * 6) + 400
  95. y7 = INT(COS(s7 / 810 * 3.141592) * (angle * 6) / tilt) + 300
  96.  
  97. 'Neptune
  98. oldx8 = x8
  99. x8 = INT(SIN(s8 / 990 * 3.141592) * angle * 7.5) + 400
  100. y8 = INT(COS(s8 / 990 * 3.141592) * (angle * 7.5) / tilt) + 300
  101.  
  102.  
  103. 'Sun
  104. CIRCLE (400, 300), 5, _RGB32(249, 240, 22)
  105. PAINT (400, 300), _RGB32(249, 240, 22)
  106.  
  107. IF tilt > 6 THEN
  108.     IF x1 > oldx1 AND x1 > 375 AND x1 < 425 THEN z(1) = 1
  109.     IF x2 > oldx2 AND x2 > 375 AND x2 < 425 THEN z(2) = 1
  110.     IF x3 > oldx3 AND x3 > 375 AND x3 < 425 THEN z(3) = 1
  111.     IF x5 > oldx5 AND x5 > 375 AND x5 < 425 THEN z(4) = 1
  112.     IF x6 > oldx6 AND x6 > 375 AND x6 < 425 THEN z(5) = 1
  113.     IF x7 > oldx7 AND x7 > 375 AND x7 < 425 THEN z(6) = 1
  114.     IF x8 > oldx8 AND x8 > 375 AND x8 < 425 THEN z(7) = 1
  115.     IF x > oldx AND x > 375 AND x < 425 THEN z(8) = 1
  116.  
  117.     IF x1 > oldx1 AND x1 > 424 THEN z(1) = 0
  118.     IF x2 > oldx2 AND x2 > 424 THEN z(2) = 0
  119.     IF x3 > oldx3 AND x3 > 424 THEN z(3) = 0
  120.     IF x5 > oldx5 AND x5 > 424 THEN z(4) = 0
  121.     IF x6 > oldx6 AND x6 > 424 THEN z(5) = 0
  122.     IF x7 > oldx7 AND x7 > 424 THEN z(6) = 0
  123.     IF x8 > oldx8 AND x8 > 424 THEN z(7) = 0
  124.     IF x > oldx AND x > 424 THEN z(8) = 0
  125.  
  126.  
  127.     IF x1 < oldx1 THEN z(1) = 0
  128.     IF x2 < oldx2 THEN z(2) = 0
  129.     IF x3 < oldx3 THEN z(3) = 0
  130.     IF x5 < oldx5 THEN z(4) = 0
  131.     IF x6 < oldx6 THEN z(5) = 0
  132.     IF x7 < oldx7 THEN z(6) = 0
  133.     IF x8 < oldx8 THEN z(7) = 0
  134.     IF x < oldx THEN z(8) = 0
  135.  
  136.     IF z(1) = 0 THEN
  137.         'Mercury
  138.         CIRCLE (x1, y1), 5, _RGB32(120, 98, 102)
  139.         PAINT (x1, y1), _RGB32(120, 98, 102)
  140.     END IF
  141.  
  142.     IF z(2) = 0 THEN
  143.         'Venus
  144.         CIRCLE (x2, y2), 5, _RGB32(161, 67, 39)
  145.         PAINT (x2, y2), _RGB32(161, 67, 39)
  146.     END IF
  147.  
  148.     IF z(8) = 0 THEN
  149.         'Earth
  150.         CIRCLE (x, y), 5, _RGB32(0, 0, 255)
  151.         PAINT (x, y), _RGB32(0, 0, 255)
  152.         'Moon
  153.         CIRCLE (x4, y4), 2.5, _RGB32(179, 179, 181)
  154.         PAINT (x4, y4), _RGB32(179, 179, 181)
  155.     END IF
  156.     IF z(3) = 0 THEN
  157.         'Mars
  158.         CIRCLE (x3, y3), 5, _RGB32(240, 72, 22)
  159.         PAINT (x3, y3), _RGB32(240, 72, 22)
  160.     END IF
  161.     IF z(4) = 0 THEN
  162.         'Outer Planets
  163.         'Jupiter
  164.         CIRCLE (x5, y5), 5, _RGB32(255, 166, 127)
  165.         PAINT (x5, y5), _RGB32(255, 166, 127)
  166.     END IF
  167.     IF z(5) = 0 THEN
  168.         'Saturn
  169.         CIRCLE (x6, y6), 5, _RGB32(255, 127, 127)
  170.         PAINT (x6, y6), _RGB32(255, 127, 127)
  171.         FOR rings = 4 TO 5
  172.             CIRCLE (x6, y6), 7 + rings, _RGB32(255, 127, 127), , , .2
  173.         NEXT rings
  174.     END IF
  175.     IF z(6) = 0 THEN
  176.         'Uranus
  177.         CIRCLE (x7, y7), 5, _RGB32(127, 166, 255)
  178.         PAINT (x7, y7), _RGB32(127, 166, 255)
  179.     END IF
  180.     IF z(7) = 0 THEN
  181.         'Neptune
  182.         CIRCLE (x8, y8), 5, _RGB32(0, 78, 255)
  183.         PAINT (x8, y8), _RGB32(0, 78, 255)
  184.     END IF
  185.  
  186.  
  187.     'Mercury
  188.     CIRCLE (x1, y1), 5, _RGB32(120, 98, 102)
  189.     PAINT (x1, y1), _RGB32(120, 98, 102)
  190.  
  191.     'Venus
  192.     CIRCLE (x2, y2), 5, _RGB32(161, 67, 39)
  193.     PAINT (x2, y2), _RGB32(161, 67, 39)
  194.  
  195.     'Earth
  196.     CIRCLE (x, y), 5, _RGB32(0, 0, 255)
  197.     PAINT (x, y), _RGB32(0, 0, 255)
  198.     'Moon
  199.     CIRCLE (x4, y4), 2.5, _RGB32(179, 179, 181)
  200.     PAINT (x4, y4), _RGB32(179, 179, 181)
  201.  
  202.     'Mars
  203.     CIRCLE (x3, y3), 5, _RGB32(240, 72, 22)
  204.     PAINT (x3, y3), _RGB32(240, 72, 22)
  205.  
  206.     'Outer Planets
  207.     'Jupiter
  208.     CIRCLE (x5, y5), 5, _RGB32(255, 166, 127)
  209.     PAINT (x5, y5), _RGB32(255, 166, 127)
  210.  
  211.     'Saturn
  212.     CIRCLE (x6, y6), 5, _RGB32(255, 127, 127)
  213.     PAINT (x6, y6), _RGB32(255, 127, 127)
  214.     FOR rings = 1 TO 2
  215.         CIRCLE (x6, y6), 7 + rings, _RGB32(255, 127, 127), , , .65
  216.     NEXT rings
  217.  
  218.     'Uranus
  219.     CIRCLE (x7, y7), 5, _RGB32(127, 166, 255)
  220.     PAINT (x7, y7), _RGB32(127, 166, 255)
  221.  
  222.     'Neptune
  223.     CIRCLE (x8, y8), 5, _RGB32(0, 78, 255)
  224.     PAINT (x8, y8), _RGB32(0, 78, 255)
  225.  
  226. IF seconds > 99999 THEN
  227.     CLS
  228.     seconds = 0
  229.     GOTO one:
  230. GOTO one:
  231.  
  232.  
« Last Edit: August 19, 2019, 02:55:31 am by SierraKen »

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Star Backgound
« Reply #91 on: August 19, 2019, 02:56:41 am »
Here is a better version, thanks to B+ for the comments in the other thread. This one hides the planets when they go further away.

(Note: Please go to my next one, thanks.)

Code: QB64: [Select]
  1. 'Ken G. made thie program on August 18, 2019,
  2. 'Thank you to STxAxTIC on the QB64.org forum for a little bit of help with The Moon orbit!
  3.  
  4. _TITLE "Solar System Simulator by Ken G. Use Mouse Over Planets, Mouse Wheel to Zoom, and Up and Down Arrow Keys To Tilt."
  5. SCREEN _NEWIMAGE(800, 600, 32)
  6. DIM z(10)
  7. mercury = 0.241
  8. venus = 0.6152
  9. mars = 1.8809
  10. jupiter = 11.8618
  11. saturn = 29.457
  12. uranus = 84.0205
  13. neptune = 164.8
  14. angle = 180
  15. tilt = 1
  16. one:
  17. _LIMIT 500
  18. mouseWheel = 0
  19.     mouseX = _MOUSEX
  20.     mouseY = _MOUSEY
  21.     mouseLeftButton = _MOUSEBUTTON(1)
  22.     mouseRightButton = _MOUSEBUTTON(2)
  23.     mouseMiddleButton = _MOUSEBUTTON(3)
  24.     mouseWheel = mouseWheel + _MOUSEWHEEL
  25. IF mouseWheel < 0 THEN angle = angle - 10
  26. IF mouseWheel > 0 THEN angle = angle + 10
  27.  
  28. IF mouseX > 385 AND mouseX < 415 AND mouseY > 285 AND mouseY < 315 THEN LOCATE 2, 49: PRINT "Sun    "
  29. IF mouseX > x1 - 15 AND mouseX < x1 + 15 AND mouseY > y1 - 15 AND mouseY < y1 + 15 THEN LOCATE 2, 49: PRINT "Mercury"
  30. IF mouseX > x2 - 15 AND mouseX < x2 + 15 AND mouseY > y2 - 15 AND mouseY < y2 + 15 THEN LOCATE 2, 49: PRINT "Venus  "
  31. IF mouseX > x - 15 AND mouseX < x + 15 AND mouseY > y - 15 AND mouseY < y + 15 THEN LOCATE 2, 49: PRINT "Earth  "
  32. IF mouseX > x3 - 15 AND mouseX < x3 + 15 AND mouseY > y3 - 15 AND mouseY < y3 + 15 THEN LOCATE 2, 49: PRINT "Mars   "
  33. IF mouseX > x5 - 15 AND mouseX < x5 + 15 AND mouseY > y5 - 15 AND mouseY < y5 + 15 THEN LOCATE 2, 49: PRINT "Jupiter"
  34. IF mouseX > x6 - 15 AND mouseX < x6 + 15 AND mouseY > y6 - 15 AND mouseY < y6 + 15 THEN LOCATE 2, 49: PRINT "Saturn "
  35. IF mouseX > x7 - 15 AND mouseX < x7 + 15 AND mouseY > y7 - 15 AND mouseY < y7 + 15 THEN LOCATE 2, 49: PRINT "Uranus "
  36. IF mouseX > x8 - 15 AND mouseX < x8 + 15 AND mouseY > y8 - 15 AND mouseY < y8 + 15 THEN LOCATE 2, 49: PRINT "Neptune"
  37.  
  38. a$ = INKEY$
  39. IF a$ = CHR$(27) THEN END
  40. IF a$ = CHR$(0) + CHR$(72) THEN tilt = tilt + 1
  41. IF a$ = CHR$(0) + CHR$(80) THEN tilt = tilt - 1
  42. IF angle > 360 THEN angle = 360
  43. IF angle < 10 THEN angle = 10
  44. IF tilt > 30 THEN tilt = 30
  45. IF tilt < 1 THEN tilt = 1
  46. seconds = seconds + .01
  47. s1 = (60 - seconds) * 6 + 180 / mercury
  48. s2 = (60 - seconds) * 6 + 180 / venus
  49. s3 = (60 - seconds) * 6 + 180 'Earth and Moon
  50. s4 = (60 - seconds) * 6 + 180 / mars
  51. s5 = (60 - seconds) * 6 + 180 / jupiter
  52. s6 = (60 - seconds) * 6 + 180 / saturn
  53. s7 = (60 - seconds) * 6 + 180 / uranus
  54. s8 = (60 - seconds) * 6 + 180 / neptune
  55.  
  56.  
  57. 'Mercury
  58. oldx1 = x1
  59. x1 = INT(SIN(s1 / 45 * 3.141592) * angle / 4) + 400
  60. y1 = INT(COS(s1 / 45 * 3.141592) * (angle / 4) / tilt) + 300
  61.  
  62. 'Venus
  63. oldx2 = x2
  64. x2 = INT(SIN(s2 / 90 * 3.141592) * angle / 2) + 400
  65. y2 = INT(COS(s2 / 90 * 3.141592) * (angle / 2) / tilt) + 300
  66.  
  67. 'Earth
  68. oldx = x
  69. x = INT(SIN(s3 / 180 * 3.141592) * angle) + 400
  70. y = INT(COS(s3 / 180 * 3.141592) * angle / tilt) + 300
  71.  
  72. 'Mars
  73. oldx3 = x3
  74. x3 = INT(SIN(s4 / 270 * 3.141592) * angle * 1.5) + 400
  75. y3 = INT(COS(s4 / 270 * 3.141592) * (angle * 1.5) / tilt) + 300
  76.  
  77. 'Moon
  78. x4 = INT(SIN(19 * s3 / 270 * 3.141592) * angle / 10) + x
  79. y4 = INT(COS(19 * s3 / 270 * 3.141592) * (angle / 10) / tilt) + y
  80.  
  81. 'Outer Planets
  82. 'Jupiter
  83. oldx5 = x5
  84. x5 = INT(SIN(s5 / 450 * 3.141592) * angle * 3) + 400
  85. y5 = INT(COS(s5 / 450 * 3.141592) * (angle * 3) / tilt) + 300
  86.  
  87. 'Saturn
  88. oldx6 = x6
  89. x6 = INT(SIN(s6 / 630 * 3.141592) * angle * 4.5) + 400
  90. y6 = INT(COS(s6 / 630 * 3.141592) * (angle * 4.5) / tilt) + 300
  91.  
  92. 'Uranus
  93. oldx7 = x7
  94. x7 = INT(SIN(s7 / 810 * 3.141592) * angle * 6) + 400
  95. y7 = INT(COS(s7 / 810 * 3.141592) * (angle * 6) / tilt) + 300
  96.  
  97. 'Neptune
  98. oldx8 = x8
  99. x8 = INT(SIN(s8 / 990 * 3.141592) * angle * 7.5) + 400
  100. y8 = INT(COS(s8 / 990 * 3.141592) * (angle * 7.5) / tilt) + 300
  101.  
  102.  
  103. 'Sun
  104. CIRCLE (400, 300), 2, _RGB32(249, 240, 22)
  105. PAINT (400, 300), _RGB32(249, 240, 22)
  106.  
  107. IF tilt > 6 THEN
  108.     IF x1 > oldx1 THEN z(1) = 1
  109.     IF x2 > oldx2 THEN z(2) = 1
  110.     IF x3 > oldx3 THEN z(3) = 1
  111.     IF x5 > oldx5 THEN z(4) = 1
  112.     IF x6 > oldx6 THEN z(5) = 1
  113.     IF x7 > oldx7 THEN z(6) = 1
  114.     IF x8 > oldx8 THEN z(7) = 1
  115.     IF x > oldx THEN z(8) = 1
  116.     IF x1 < oldx1 THEN z(1) = 0
  117.     IF x2 < oldx2 THEN z(2) = 0
  118.     IF x3 < oldx3 THEN z(3) = 0
  119.     IF x5 < oldx5 THEN z(4) = 0
  120.     IF x6 < oldx6 THEN z(5) = 0
  121.     IF x7 < oldx7 THEN z(6) = 0
  122.     IF x8 < oldx8 THEN z(7) = 0
  123.     IF x < oldx THEN z(8) = 0
  124.  
  125.     IF z(1) = 0 THEN
  126.         'Mercury
  127.         CIRCLE (x1, y1), 5, _RGB32(120, 98, 102)
  128.         PAINT (x1, y1), _RGB32(120, 98, 102)
  129.     END IF
  130.  
  131.     IF z(2) = 0 THEN
  132.         'Venus
  133.         CIRCLE (x2, y2), 5, _RGB32(161, 67, 39)
  134.         PAINT (x2, y2), _RGB32(161, 67, 39)
  135.     END IF
  136.  
  137.     IF z(8) = 0 THEN
  138.         'Earth
  139.         CIRCLE (x, y), 5, _RGB32(0, 0, 255)
  140.         PAINT (x, y), _RGB32(0, 0, 255)
  141.         'Moon
  142.         CIRCLE (x4, y4), 2.5, _RGB32(179, 179, 181)
  143.         PAINT (x4, y4), _RGB32(179, 179, 181)
  144.     END IF
  145.     IF z(3) = 0 THEN
  146.         'Mars
  147.         CIRCLE (x3, y3), 5, _RGB32(240, 72, 22)
  148.         PAINT (x3, y3), _RGB32(240, 72, 22)
  149.     END IF
  150.     IF z(4) = 0 THEN
  151.         'Outer Planets
  152.         'Jupiter
  153.         CIRCLE (x5, y5), 5, _RGB32(255, 166, 127)
  154.         PAINT (x5, y5), _RGB32(255, 166, 127)
  155.     END IF
  156.     IF z(5) = 0 THEN
  157.         'Saturn
  158.         CIRCLE (x6, y6), 5, _RGB32(255, 127, 127)
  159.         PAINT (x6, y6), _RGB32(255, 127, 127)
  160.         FOR rings = 1 TO 2
  161.             CIRCLE (x6, y6), 7 + rings, _RGB32(255, 127, 127), , , .65
  162.         NEXT rings
  163.     END IF
  164.     IF z(6) = 0 THEN
  165.         'Uranus
  166.         CIRCLE (x7, y7), 5, _RGB32(127, 166, 255)
  167.         PAINT (x7, y7), _RGB32(127, 166, 255)
  168.     END IF
  169.     IF z(7) = 0 THEN
  170.         'Neptune
  171.         CIRCLE (x8, y8), 5, _RGB32(0, 78, 255)
  172.         PAINT (x8, y8), _RGB32(0, 78, 255)
  173.     END IF
  174.  
  175.  
  176.     'Mercury
  177.     CIRCLE (x1, y1), 5, _RGB32(120, 98, 102)
  178.     PAINT (x1, y1), _RGB32(120, 98, 102)
  179.  
  180.     'Venus
  181.     CIRCLE (x2, y2), 5, _RGB32(161, 67, 39)
  182.     PAINT (x2, y2), _RGB32(161, 67, 39)
  183.  
  184.     'Earth
  185.     CIRCLE (x, y), 5, _RGB32(0, 0, 255)
  186.     PAINT (x, y), _RGB32(0, 0, 255)
  187.     'Moon
  188.     CIRCLE (x4, y4), 2.5, _RGB32(179, 179, 181)
  189.     PAINT (x4, y4), _RGB32(179, 179, 181)
  190.  
  191.     'Mars
  192.     CIRCLE (x3, y3), 5, _RGB32(240, 72, 22)
  193.     PAINT (x3, y3), _RGB32(240, 72, 22)
  194.  
  195.     'Outer Planets
  196.     'Jupiter
  197.     CIRCLE (x5, y5), 5, _RGB32(255, 166, 127)
  198.     PAINT (x5, y5), _RGB32(255, 166, 127)
  199.  
  200.     'Saturn
  201.     CIRCLE (x6, y6), 5, _RGB32(255, 127, 127)
  202.     PAINT (x6, y6), _RGB32(255, 127, 127)
  203.     FOR rings = 1 TO 2
  204.         CIRCLE (x6, y6), 7 + rings, _RGB32(255, 127, 127), , , .65
  205.     NEXT rings
  206.  
  207.     'Uranus
  208.     CIRCLE (x7, y7), 5, _RGB32(127, 166, 255)
  209.     PAINT (x7, y7), _RGB32(127, 166, 255)
  210.  
  211.     'Neptune
  212.     CIRCLE (x8, y8), 5, _RGB32(0, 78, 255)
  213.     PAINT (x8, y8), _RGB32(0, 78, 255)
  214.  
  215. IF seconds > 99999 THEN
  216.     CLS
  217.     seconds = 0
  218.     GOTO one:
  219. GOTO one:
  220.  
  221.  

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Star Backgound
« Reply #92 on: August 19, 2019, 07:32:06 am »
Your tilting function is pretty cool, that's something I've not tried to do with 3D simulations. I'm going to be studying that one. Thanks.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Star Backgound
« Reply #93 on: August 19, 2019, 01:05:49 pm »
Welcome OldMoses, you can also thank B+ for this thread, which gave me the idea to switch views from 2D to 3D. :)