September 29th, 2003

nyah, tongueout, glasses, nerd


I just finished a CS101 assignment... with a few modifications. The assignment was to make a recursive function to subdivide a square into a lot of little tiny squares, four pixels to a side, by splitting a box into quadrants, splitting each of those boxes into quadrants, splitting each of those boxes into quadrants, splitting each of those boxes into quadrants... until it's small enough.

I did that, but modified the program. (Someone else already did this sort of modification, so I know it's accepted.) I've now got it tiling a 512x512-pixel area, down to a single pixel instead of four-pixel squares.

But it's not spitting out a solid black blob; the algorigthm, instead of painting black lines, starts out with gray lines and then determines the next inner level of lines to draw by taking the current level's color and randomly modifying it slightly. The end result is this beautiful fractal pattern of color-sectors, not easily described without seeing it.

Screenshot to follow. The program is still running; no surprise, considering it's going to have to use over two hundred thousand (200,000) function calls to draw the picture. I'll screenshot the output, upload it somewhere, and let y'all ooh and ahh over it. Then I'll set it as my desktop wallpaper.

It's a lot of fun to watch, too. All you Java programmers out there- the source is availible for the asking.
  • Current Music
    Sombra Aymara- Sombra Aymara