Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TOONS
#1
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
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#2
TV snow...
Screwing with your reality since 1998.
Reply
#3
It probably originated from a 9 line contest located here: http://qbnz.com/pages/downloads/limitedline/9liners.zip
-yah
Reply
#4
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!
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#5
No problem. Yeah thats a realy great group of programs. My fav is the rotating DNA.
-yah
Reply
#6
Sounds good. Could you tell me the name of the rotating DNA program?
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#7
Now that you mention it I don't remember it's name. I guess you will have to go digging through them! Tongue
-yah
Reply
#8
Oh, I remember that program! It's here.
url=http://qblide.forumer.com]QBLIDE lives here. Sign up and be spared. Refuse and be shot.[/url]
-------------------------------------------------------------------------------------
[Image: style1,teh-spc-spaz.png]
-------------------------------------------------------------------------------------
Who says I have a limited attention span? Oh look, a rock!
Reply
#9
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
Reply
#10
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"?
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)