Sound Wave Bar..... Mitthrawnuruodo Senior Member Posts: 503 Threads: 31 Joined: Feb 2005 04-07-2005, 04:38 AM 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. 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] Rattrapmax6 Posting Freak Posts: 2,404 Threads: 153 Joined: Jan 2005 04-07-2005, 04:57 AM Right on man, was hoping you'd go on and do that!! Just plain alsome! d==b Kevin (x.t.r.GRAPHICS) Mitthrawnuruodo Senior Member Posts: 503 Threads: 31 Joined: Feb 2005 04-07-2005, 06:19 AM Thnx but remember I couldn't have done it without you. i]"But...it was so beautifully done"[/i] xteraco Senior Member Posts: 442 Threads: 107 Joined: Feb 2005 04-07-2005, 06:32 AM 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][/url] relsoft Posting Freak Posts: 3,288 Threads: 167 Joined: Nov 2001 04-07-2005, 11:15 AM Someone exegenate lynx's entry! y smiley is 24 bit. Genso's Junkyard: http://rel.betterwebber.com/ Anonymous Guest   04-07-2005, 11:34 AM i second that, this new demo also crashes when i try to run it, compiles fine.... shiftLynx Senior Member Posts: 320 Threads: 9 Joined: Dec 2004 04-07-2005, 08:23 PM 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. Hope you like this one. -shiftLynx [EDIT: forgot to remove a comment from the code ] [EDIT2: slight alteration to make the left-hand-side look a bit tidier] img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img] Kylemc Senior Member Posts: 254 Threads: 8 Joined: Apr 2005 04-08-2005, 12:07 AM I know these are levelbars and not wavebars, but they look pretty oldskool (especially number 1).  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``` Mitthrawnuruodo Senior Member Posts: 503 Threads: 31 Joined: Feb 2005 04-08-2005, 12:14 AM Quote:Someone exegenate lynx's entry! Ok....ummm...Rel....what do you mean? I looked it up on dictionary.com.....no luck. :-? i]"But...it was so beautifully done"[/i] Mitthrawnuruodo Senior Member Posts: 503 Threads: 31 Joined: Feb 2005 04-08-2005, 12:22 AM That's great Kylemc i]"But...it was so beautifully done"[/i] « Next Oldest | Next Newest »