Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound Wave Bar.....
#21
Quote:My small entry:

[syntax="QBASIC"]
1 amp! = 50.0
2 while inkey$ = ""
3 if t! = 0.0 then screen 13 else wait &H3DA, 8
4 line (319, 99)-(0, 99), 8
5 for x! = 0.0 to 319.0 step 1.0
6 if x! < t! and x! > t! - 15.0 then line (int(x!) - 1, 99 + int(amp! * sin(2 * 3.141592654 * ((x! - 1) / (334.0 / 3.0)))))-(int(x!), 99 + int(amp! * sin(2 * 3.141592654 * (x! / (334.0 / 3.0))))), 31 - int(t! - x!)
7 next x!
8 if t! < 334.0 then t! = t! + 1.0 else t! = 1.0
9 wend
[/syntax]



I can't test this in QB, but it should theoretically work. [EDIT: written/tested in FreeBASIC].

-shiftLynx

^ crashes when i run it in fb xO
Reply
#22
thats interesting, it ran fine for me
url=http://www.random-seed.net][Image: asylumsig.png][/url]
Reply
#23
Ratings thus far.. Big Grin

Name | Size (9)| Style (#/10)| Entry # | Compiler

xteraco | 6 | 5/10 | #1 | FB
Red Marvin | 9 | 7/10 | #1 | QB/FB
Shift Lynx | 9 | 10/10 | #1 | QB/FB
Rattrapmax6 | 9 | N/A | #1 | FB
Rattrapmax6 | 8 | N/A | #2 | QB/FB

Shift's ran in my FB also.. hmm, oh well..

Looking nice I must say.. Big Grin .. Alot of wave bars!!!!
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#24
BAHAAWA <-- To quote from xteraco

Here's my entry....1 line! Tongue I own all!

Code:
PRINT "~"
i]"But...it was so beautifully done"[/i]
Reply
#25
:lol: Nice try Mitth, but, I did state it needed a axis, and a variable amplitude... :rotfl:

No more? Mitth, you can make one aye? just leave the x rotate out and switch it to slide across the screen while y rotates.. simple.. ^_^=b
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#26
I was going to do a 3D one but.....naw
i]"But...it was so beautifully done"[/i]
Reply
#27
:o That I'd like to see... why not! :???: :bounce:
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#28
Too little time. Cry + Lazy
i]"But...it was so beautifully done"[/i]
Reply
#29
I experimented with adding a reflection, but of course, without room to add a blurring function, it ended up looking rubbish. Smile

It's also hard to just "imagine" that a plane is there titled towards you at 30 degrees.

Anyway, I managed to get it down to 9 lines by spoiling the meter a little bit.

[syntax="QBASIC"]
1 amp! = 25.0
2 while inkey$ = ""
3 if t! = 0.0 then screen 13 else if t! = 1.0 then line (319, 99)-(0, 99), 8 else wait &H3DA, 8
4 for x! = 0.0 to 319.0 step 1.0
5 if x! < t! and x! > t! - 15.0 then line (int(x!) - 1, 99 + int(amp! * sin(2 * 3.141592654 * ((x! - 1) / (334.0 / 6.0)))))-(int(x!), 99 + int(amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0))))), 31 - int(t! - x!)
6 if x! < t! and x! > t! - 15.0 then pset(int(x!), 106 + int(((-((amp! * sin((2 * 3.141592654 * x!) / (334.0 / 6.0)))+7) + (2.0 * 100.0)) / 8.0))), 28.0 - (25.0 / ((((100.0 - (2.0 * ((-(amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))) + (2.0 * 100.0)) / 8.0))) * (100.0 - (2.0 * ((-(amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))) + (2.0 * 100.0)) / 8.0)))) + ((amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))) * (amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))))) / 700.0)) else pset(int(x!), 106 + int(((-((amp! * sin((2 * 3.141592654 * x!) / (334.0 / 6.0)))+7) + (2.0 * 100.0)) / 8.0))), 25.0 - (25.0 / ((((100.0 - (2.0 * ((-(amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))) + (2.0 * 100.0)) / 8.0))) * (100.0 - (2.0 * ((-(amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))) + (2.0 * 100.0)) / 8.0)))) + ((amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))) * (amp! * sin(2 * 3.141592654 * (x! / (334.0 / 6.0)))))) / 700.0))
7 next x!
8 if t! < 334.0 then t! = t! + 1.0 else t! = 1.0
9 wend
[/syntax]

Again, untested in QB, but it worked okay in FB.

-shiftLynx
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#30
:o That was,...... brillant!!!!!!!!!!111 :wink:
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)