Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound Wave Bar.....
#31
heh....*sigh* well I couldn't see it, QB said that your expression was too complex....doh! :x :lol:

But anyways...Rattra, I got past my laziness and wipped up something....I had to use the FOR delay cause TIMER was too slow + WAITs were too fast.

Yes I know it breaks so many rules of this competittion but its just soo cool.Big Grin

What you think?
[syntax="qbasic"]
'Wave Bar by Kevin(x.t.r.GRAPHICS)
'Redone by Mitth'raw'nuruodo

SCREEN 13
amp = 40 'Amplitude Ajust
sp = 300000 'speed adjust
Offset% = 0: angx = 0: angy = 0: angz = 0
rad = 3.141593 / 180
DO
Offset% = Offset% + 1
angx = (angx + 3) MOD 360: angy = (angy + 3) MOD 360
angz = (angz + 3) MOD 360
sx! = SIN(angx * rad): sy! = SIN(angy * rad)
sz! = SIN(angz * rad): cx! = COS(angx * rad)
cy! = COS(angy * rad): cz! = COS(angz * rad)
xx! = (cy! * cz!): xy! = ((sy! * cz! * sx!) - (cx! * sz!))
xz! = ((sy! * cz! * cx!) + (sx! * sz!))
yx! = (cy! * sz!): yy! = ((sx! * sy! * sz!) + (cx! * cz!))
yz! = ((cx! * sy! * sz!) - (sx! * cz!)): zx! = -sy!
zy! = (sx! * cy!): zz! = (cx! * cy!)
FOR j = 1 TO 3
FOR x = 1 TO 320
y! = amp * SIN(ang * 3.24 / 180)
x1 = x + Offset%
IF x1 > 319 THEN x1 = 0 + x
IF Offset% > 319 THEN
px! = x1
py! = y!
pz! = -20 - (j * 100)
fx1! = ((px! * xx!) + (py! * xy!) + (pz! * xz!))
fy1! = ((px! * yx!) + (py! * yy!) + (pz! * yz!))
fz1! = ((px! * zx!) + (py! * zy!) + (pz! * zz!)) - 500
distance% = 256 - fz1!
IF distance% > 0 THEN
fx = 160 + (256 * fx1! / distance%)
fy = 100 - (256 * fy1! / distance%)
PSET (fx, fy), 9
END IF
END IF
ang = ang + 1
NEXT x
NEXT j
IF Offset% > 319 THEN
WAIT &H3DA, 8
WAIT &H3DA, 8, 8
FOR i = 1 TO sp: NEXT i
CLS
END IF
LOOP
[/syntax]

Check! King me :king: :rotfl:
i]"But...it was so beautifully done"[/i]
Reply
#32
Big Grin Right on man, was hoping you'd go on and do that!!

Just plain alsome! d=Big Grin=b
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#33
Thnx but remember I couldn't have done it without you. Big Grin
i]"But...it was so beautifully done"[/i]
Reply
#34
i think i'm throwing in the towl on this one :normal: i cant hold my own against shift.. lol, its like a ford festiva vs dodge viper
url=http://www.random-seed.net][Image: asylumsig.png][/url]
Reply
#35
Someone exegenate lynx's entry!
Wink
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#36
i second that, this new demo also crashes when i try to run it, compiles fine....
Reply
#37
By far my best. Coded in FreeBASIC, hopefully it should work in QB (one of the lines might be too long though).

[syntax="QBASIC"]
1 amp! = 25.0
2 if t! = 0.0 then screen 13 else cls
3 line (319, int(((256.0 * amp! * 99.0) / (256.0 + (250.0 - (100.0 * sin(t! / 6.0))) + (amp! * (250.0 - (100.0 * sin(t! / 6.0))))))))-(0, int(((256.0 * amp! * 99.0) / (256.0 + (250.0 - (100.0 * sin(t! / 6.0))) + (amp! * (250.0 - (100.0 * sin(t! / 6.0)))))))), 17
4 for x! = -1 to 450 step 5
5 line step-(int(((256.0 * amp! * x!) / (256.0 + (250.0 - (100.0 * sin(t! / 6.0))) + (amp! * ((250.0 - (100.0 * sin(t! / 6.0))) + (amp! * cos(t! + ((x! * 2.0 * 3.141592654) / 100.0)))))))), int(((256.0 * amp! * (99.0 + (amp! * sin(t! + ((x! * 2.0 * 3.141592654) / 100.0))))) / (256.0 + (250.0 - (100.0 * sin(t! / 6.0))) + (amp! * ((250.0 - (100.0 * sin(t! / 6.0))) + (amp! * cos(t! + ((x! * 2.0 * 3.141592654) / 100.0))))))))), ((26 - int(((((250.0 - (100.0 * sin(t! / 6.0))) + (amp! * cos(t! + ((x! * 2.0 * 3.141592654) / 100.0)))) - (250.0 - (100.0 * sin(t! / 6.0))) + amp!) / (2.0 * amp!)) * 10.0)) - 100)
6 next x!
7 t! = t! + 0.01
8 if t! >= (12.0 * 3.141592654) then t! = 0.001 else wait &h3da, 8
9 if inkey$ = "" then goto 2
[/syntax]

3D rotating coil, based on a sinusoidal wave; zoom and modified Lambert shading. It even has a reference bar. Wink

Hope you like this one.

-shiftLynx

[EDIT: forgot to remove a comment from the code Wink]
[EDIT2: slight alteration to make the left-hand-side look a bit tidier]
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#38
I know these are levelbars and not wavebars, but they look pretty oldskool (especially number 1).
[edit] The delay for both of them is for a 3GHz machine, so it might not look right.

Code:
10  SCREEN 13
20  DIM y(100)
30  CLS
40  FOR x = 1 TO 100
50  IF INT(RND * 2) + 1 = 1 THEN y(x) = y(x) - 1 ELSE y(x) = y(x) + 1
60  IF y(x) < 80 THEN y(x) = 80 ELSE IF y(x) > 100 THEN y(x) = 100
70  LINE (60 + x * 2, y(x))-(60 + x * 2, 100), 28
80  PSET (60 + x * 2, y(x) - 2), 24
90  NEXT x
100 FOR DEL = 1 TO 100000
110 NEXT DEL
120 GOTO 30

Peh, I know I can improve it (a lot) and probably fit it in 9 lines, but that flicker is part of the retro feel to it :rotfl: . Heres the second one (slightly different + no flicker):

Code:
10  SCREEN 13
20  DIM y(100)
30  FOR x = 1 TO 100
40  IF INT(RND * 2) + 1 = 1 THEN y(x) = y(x) - 1 ELSE y(x) = y(x) + 1
50  IF y(x) < 80 THEN y(x) = 80 ELSE IF y(x) > 100 THEN y(x) = 100
60  LINE (60 + x * 2, y(x))-(60 + x * 2, 100), 30
70  PSET (60 + x * 2, y(x) - 2), 22
80  NEXT x
90 FOR DEL = 1 TO 100000
100 NEXT DEL
110 GOTO 30
Reply
#39
Quote:Someone exegenate lynx's entry!
Wink

Ok....ummm...Rel....what do you mean? I looked it up on dictionary.com.....no luck. :-?
i]"But...it was so beautifully done"[/i]
Reply
#40
That's great Kylemc
i]"But...it was so beautifully done"[/i]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)