Qbasicnews.com

Full Version: TOONS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I don't remember where I got this original program, but, it is amazing, in that just 9 lines produce such a complex result!

If this program was previously posted here, my apologies. Not knowing this, I venture to post it, as I think it is very good!

Aspect ratio was too high, so, I added my own aspect ratio multiplier, ar, to get closer to a true circle

The program consists of simply drawing a line and a point, over and over again. To watch this, just unremark the 'SLEEP that I've added, between lines 7 and 8, and press the Space bar to see the performance, one drawn line and point at a time.

When running the program with the 'SLEEP remarked out, you will see the wreath turn counterclockwise for about 6 seconds, then clockwise for another 6 seconds, then counterclockwise for a long time... All with the repetitious drawing of a line and a point! It is a really amazing result!

Code:
ar = 1.33
1 SCREEN 13
2 FOR x = 0 TO ATN(1) * 8 STEP ATN(1) / 2
3   c = (c + 1) MOD 16
4   a = a - ATN(1) / 90
5  LINE (160 + ar*COS(a - x) * 70, 100 + SIN(a - x) * 70)-(160 + ar*COS(ATN(1) * 2 + x) * 70, 100 + SIN(ATN(1) * 2 + x) * 70), c MOD 8
6  LINE (160 + ar*COS(a - x) * 50, 100 + SIN(a - x) * 50)-(160 + ar*COS(ATN(1) * 2 + x) * 50, 100 + SIN(ATN(1) * 2 + x) * 50), a MOD 8
7   PSET (COS(RND * ATN(1) * 8) * (RND * 30 + 70) + 160, SIN(RND * ATN(1) * 8) * (RND * 30 + 70) + 100), RND * 255
'SLEEP
8 NEXT x
9 GOTO 2
TV snow...
It probably originated from a 9 line contest located here: http://qbnz.com/pages/downloads/limitedline/9liners.zip
Wow!, what a collection of wonderful 9-line programs! Thank you for posting the web site, zoasterboy. However, I couldn't find TOONS in that group. But, it certainly belongs there!
No problem. Yeah thats a realy great group of programs. My fav is the rotating DNA.
Sounds good. Could you tell me the name of the rotating DNA program?
Now that you mention it I don't remember it's name. I guess you will have to go digging through them! Tongue
Oh, I remember that program! It's here.

Anonymous

lol, the dna one runs way too fast in freebasic, the wreath one looks cool though. Real fast ^^

Both compiled usin latest CVS and '-lang qb' option
zoasterboy:
I guess that, like gold, it's going to take a bit of digging to find that DNA program Sad But, who knows, I might find some other jewels, along the way! Big Grin

cha0s:
What program is "the dna one runs way too fast in freebasic"?
Pages: 1 2