QB64.org Forum
Active Forums => Programs => Topic started by: SierraKen on October 27, 2019, 12:46:15 am
-
A small animated graphics program. Was just random chance that I got it to have a 3D effect playing with math and variables. :)
s = 0
a = a + .5
c = c + 1
s = s + 1
x
= COS(s
* 3.141592 / 180) * d
y
= SIN(s
* 3.151492 / 180) * d
-
Cool man! This is the first time I see you using loop instead of goto & gosub.
-
Ashish wrote:
Cool man! This is the first time I see you using loop instead of goto & gosub.
You're absolutely right, Ashish!
Finally, a program in which I can easily and quickly navigate. I hope you stay with this style, SierraKen, because GOTO - GOSUB is a terribly opaque way to work.
-
Quite a nice animation.
One small note in case you were not aware:
If you use the _LIMIT command it MUST be within the loop. It doesn't work if you call it outside the loop.
If I am wrong on this, someone can spank me, or slap me. :P lol
Aye. Limit works inside the loops. ;)
-
Goofy? Looks normal to me... lol
-
Goofy? Looks normal to me... lol
LOL maybe a little less coffee Johnno
Nice one Ken!
-
Not spirals but more variation:
_TITLE "Hypnotic Eyes" 'B+ 2019-10-27 cnt = cnt + 1
c = c + .1
clr~&
= _RGB32(127 + 127 * SIN(r
* c
), 127 + 127 * SIN(g
* c
), 127 + 127 * SIN(b
* c
)) CIRCLE (200, 225), radius
, clr~&
CIRCLE (600, 225), radius
, clr~&
-
Wow thanks everyone!!! Yeah I wasn't sure about the _LIMIT, I should have tested that. So I removed it and will put the rest of the code here.
Sometimes I have to use GOSUB's in order for different things to happen when a user does different things. I suppose everything can be in one giant IF / THEN statement of many lines. I'll try to work on that I think. Thanks.
LOL Bplus that's really cool looking! Could be used in a haunted house or carnival. :)
s = 0
a = a + .5
c = c + 1
s = s + 1
x
= COS(s
* 3.141592 / 180) * d
y
= SIN(s
* 3.151492 / 180) * d