Qbasicnews.com
So I... - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html)
+--- Forum: QB Projects (http://qbasicnews.com/newforum/forum-12.html)
+--- Thread: So I... (/thread-3165.html)

Pages: 1 2 3 4


So I... - KiZ - 02-10-2004

was looking at Jarks wonderful tutorials, you know, thinking.... "I dont have a clue what any of this stuff means..."

So that inspired me to write a new cloud type smoothing program.

It first of all has a grid of like 32x20 and then smooths it, and divides each 10x10 area in two, then smooths, it, divides them in two, smooths again, and so on, producing:

SMOOTH cloudy things Dammnit!!! Big Grin

[Image: smooth.jpg]

Code:
amount = 25
sat = 15

RANDOMIZE TIMER
SCREEN 13
FOR i = 1 TO 255
  OUT &H3C8, i: OUT &H3C9, i / 4.25: OUT &H3C9, i / 4.25: OUT &H3C9, 63
NEXT

'Init the map
LINE (0, 0)-(320, 200), 1, BF
FOR i = 1 TO amount
  posx = INT(RND * 28) + 1
  posy = INT(RND * 16) + 1
  FOR ii = 1 TO sat
    posx2 = INT(RND * 4) + posx
    posy2 = INT(RND * 4) + posy
    LINE (posx2 * 10 - 10, posy2 * 10 - 10)-(posx2 * 10, posy2 * 10), 255, BF
  NEXT
NEXT
FOR stp = 10 TO 1 STEP -1
  FOR x = 0 TO (309 + stp) / stp
    FOR y = 0 TO (189 + stp) / stp
      avcol = 0
      FOR x1 = x - 1 TO x + 1
        FOR y1 = y - 1 TO y + 1
          avcol = avcol + POINT(x1 * stp, y1 * stp)
        NEXT
      NEXT
      avcol = avcol / 9
      LINE (x * stp - stp + 1, y * stp - stp + 1)-(x * stp + 1, y * stp + 1), avcol, BF
    NEXT
  NEXT
NEXT



So I... - Zack - 02-10-2004

Add this to The Geekery... Tongue Very cool.


So I... - KiZ - 02-10-2004

YEY! Someone thinks my things are cool!!


So I... - Zack - 02-10-2004

So let other people think it's cool - get the proggie out there!
:lol:
C'mon, keep The Geekery alive...


So I... - KiZ - 02-10-2004

Har hur. added!


So I... - Zack - 02-10-2004

Thanks. Big Grin


So I... - relsoft - 02-11-2004

Quote:YEY! Someone thinks my things are cool!!

Trust me, This is IMPRESSIVE!!!!


So I... - KiZ - 02-11-2004

Huh? Ya think so? Cool! Smile I just was thinking about a nice way to create smooth clouds, and came up with this "subdivisional smoothing"... works like a treat for making smooth things.


So I... - TheBigBasicQ - 02-12-2004

dark that routine is great. Have you tried you hand at antialiasing? What you did was basically anti-aliased =P.


So I... - KiZ - 02-14-2004

Quote:dark that routine is great.
thankyou ^_^

Quote:Have you tried you hand at antialiasing?
heh....shapow!