Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
So I...
#1
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
Reply
#2
Add this to The Geekery... Tongue Very cool.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#3
YEY! Someone thinks my things are cool!!
Reply
#4
So let other people think it's cool - get the proggie out there!
:lol:
C'mon, keep The Geekery alive...
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#5
Har hur. added!
Reply
#6
Thanks. Big Grin
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#7
Quote:YEY! Someone thinks my things are cool!!

Trust me, This is IMPRESSIVE!!!!
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#8
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.
Reply
#9
dark that routine is great. Have you tried you hand at antialiasing? What you did was basically anti-aliased =P.
Reply
#10
Quote:dark that routine is great.
thankyou ^_^

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


Forum Jump:


Users browsing this thread: 1 Guest(s)