Qbasicnews.com

Full Version: So I...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
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
Add this to The Geekery... Tongue Very cool.
YEY! Someone thinks my things are cool!!
So let other people think it's cool - get the proggie out there!
:lol:
C'mon, keep The Geekery alive...
Har hur. added!
Thanks. Big Grin
Quote:YEY! Someone thinks my things are cool!!

Trust me, This is IMPRESSIVE!!!!
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.
dark that routine is great. Have you tried you hand at antialiasing? What you did was basically anti-aliased =P.
Quote:dark that routine is great.
thankyou ^_^

Quote:Have you tried you hand at antialiasing?
heh....shapow!
Pages: 1 2 3 4