The QBasic / QB64 Discussion Forum      Other Subforums, Links and Downloads
 
 Return to Index  

For mennonite, :-P

March 2 2006 at 2:04 PM
  (no login)

'There are two unfortunate things here...
'I can't recall how to make a program to replace the tabs with some unknown character.
'Also, I won't be able to edit this post later.
'The solution: Oh well... who needs tabs anyways.
'The output is the important part.
'I doubt this will work as intended, but it's worth a try.
'Try it out, leave it for a while, if it doesn't work, oh well
'Maybe it will work on someone.
'Which is why everyone -not just menn, who it was made for- can try it out.
DECLARE SUB DrawSpiral (x%, y%, radius%, rot!)
SCREEN 13

PALETTE 255, 0 'set up the palette and stuff
PALETTE 253, 0
PAINT (0, 0), 255
FOR c% = 0 TO 253
r% = 0
g% = (c% \ 16) * 4
b% = 63 - g%
PALETTE c%, b% * 65536 + g% * 256 + r%
NEXT c%


FOR x% = 30 TO 60
y% = -30 * SIN(x% * .035)
PSET (x% + 64, y% + 80), 30
PSET (x% + 64, y% + 79), 140
PSET (256 - x%, y% + 80), 30
PSET (256 - x%, y% + 79), 140
NEXT x%
FOR x% = 130 TO 170
y% = 120 - 1.75 * (x% - 130)
LINE (x%, 120)-(x%, y%), (x% - 120) * 4
NEXT x%
FOR r% = 0 TO 10
CIRCLE (160, 0), 200 + r%, r% * 8, 4.188, 5.235
NEXT r%


WHILE INKEY$ = "" 'main loop - does the animations and stuff
theta = theta + .3
IF theta > 6.27 THEN theta = 0
CALL DrawSpiral(110, 80, 20, theta)
CALL DrawSpiral(210, 80, 20, theta)

IF PLAY(n) = 0 THEN PLAY "mb": SOUND 37, 10: SOUND 50, 10
WEND

SUB DrawSpiral (x%, y%, radius%, rot)
FOR beta = 0 TO 6.28 STEP .01
theta = beta + .001
px% = radius% * COS(theta + rot)
py% = radius% * SIN(theta + rot)
PSET (px% + x%, py% + y%), (beta * 100) MOD 254

FOR r% = (radius% - 1) TO 0 STEP -1
c% = POINT(px% + x%, py% + y%)
py% = r% * SIN(theta + rot)
px% = r% * COS(theta + rot)
PSET (px% + x%, py% + y%), c%

theta = theta - .1
IF (theta + rot) < 0 THEN theta = 6.271 - rot
NEXT r%
NEXT beta
END SUB


 
 Respond to this message   
Response TitleAuthor and Date
XD ty! lol (View Thread)mennonite on Mar 2
*Too funny! (View Thread), D. Central on Mar 3

Newbies usually go to www.qbasic.com and click on The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums