QB64.org Forum
Active Forums => Programs => Topic started by: SierraKen on September 30, 2019, 09:28:03 pm
-
Hi all,
I was playing with math and graphics again tonight and just out of random luck it made a wild looking spiral-type image. So I threw some changing variables in it and made this animated black hole. The graphics don't change, just the shades of white and gray. The spiral is different than one I made awhile back on my other one and it's not like you expect to see a wormhole or black hole, but I like it, especially for being such a small program. Watch it for like a minute at least because the shades change in different ways. Thanks. Feel free to do what you wish with it, I'm just having fun. :)
_TITLE "Black Hole - by Ken G." bb = 1.1
c = 100
c2 = 155
one1:
bb = bb + .1
cc = cc + .1
sz = sz + .1
c = c - 1
one:
b = b + bb
s = (6 - b) * 6 + 180
x
= INT(SIN(s
/ 180 * 3.141592) * 180 / cc
) + 400y
= INT(COS(s
/ 180 * 3.141592) * 180 / cc
) + 300 b = 0
cc = 0
bb = 1.1
sz = 0
c2 = c2 + 5
-
Here is a colorized version:
_TITLE "Black Hole - by Ken G." bb = 1.1
c = 100
c2 = 155
one1:
bb = bb + .1
cc = cc + .1
sz = sz + .1
c = c - 1
one:
b = b + bb
s = (6 - b) * 6 + 180
x
= INT(SIN(s
/ 180 * 3.141592) * 180 / cc
) + 400y
= INT(COS(s
/ 180 * 3.141592) * 180 / cc
) + 300CIRCLE (x
, y
), 10 - sz
, _RGB32((c
+ c2
) * red
, (c
+ c2
) * green
, (c
+ c2
) * blue
) b = 0
cc = 0
bb = 1.1
sz = 0
c2 = c2 + 5
-
WOW I've never seen that use of RND colors before, thanks!
Your version looks a bit like a 1970's game show. :D.
-
Here is my updated version I made tonight. I filled in the circles. Then I made it so if someone presses the Space Bar, it automatically changes it all to wild random colors. :) Then press Space Bar again to go back. You can go back and forth. I also call it a Kaleidoscope. Enjoy.
_TITLE "Black Hole - by Ken G. - Press Space Bar For Wild Colors And Again To Go Back." bb = 1.1
c = 100
c2 = 155
one1:
bb = bb + .1
cc = cc + .1
sz = sz + .1
c = c - 1
one:
b = b + bb
s = (6 - b) * 6 + 180
x
= INT(SIN(s
/ 180 * 3.141592) * 180 / cc
) + 400y
= INT(COS(s
/ 180 * 3.141592) * 180 / cc
) + 300 b = 0
cc = 0
bb = 1.1
sz = 0
c2 = c2 + 5