Dave LeCompte (really) (tsmaster) wrote,
Dave LeCompte (really)

  • Mood:

Looks like you all have the productivity thing taken care of...

I think that my productive weekend came to a screeching halt when I realized that Outlook didn't have my entire Christmas card list. So I gave up.

More or less. Still made it to the quaint inexplicably German themed town in the mountains, grabbed a photo... poked every button on my camera to try to convince it that really, it's a perfectly good battery, you like batteries, fine if you don't want that battery, I'm sticking you in the glove compartment until you feel like behaving. Shhh - the camera's in standby mode now.

Wrote a tiny Python script to suck the pictures out of my camera and upload them to my webserver, complete with thumbnails. I probably ought to downsample them, just in case somebody wants to look at them without waiting for a day.

Have appearantly given up on full sentences.

Thought about random terrain generation. Remember "Rescue on Fractalus"? That's OK. How about Star Trek III? Me either. Anyway, people have been noodling about good ways to create plausible computer-generated terrain models for a while, and some people do better than others, some techniques are more like actual mountains than others (So Mandelbrot was sitting around in the lab one day with a fractal curve with a Hausdorff dimension around 1.2, stop me if you've heard this one before...). Anyway, so I was playing around with John Beale's GForge tool, and I thought that his approach (cribbed from Pietgen and Saupe, I guess) of using random noise in the frequency domain, and then running an inverse Fourier over it... well, I don't have to tell you, that's pretty nifty.

Man, stick a root beer in me, and I'll just go on and on like a top.

Anyway, so Beale's got some code that makes tiling terrain, and like I was saying, I was jazzed by this stuff (and I can see Rog, not even finishing reading this, ready to say that I'm a geek - let it fly, brown-shoe-man!) but I was thinking, what if we wanted to apply this sort of plasma fractal to the faces of a cube? And I noodled with several different approaches, which I'll briefly (you're welcome) describe:

  • Edge Wrapping: Take any old 6 heightmaps. Slap them onto the faces of your cube. You'll have hella obvious seams. Now take 12 more heightmaps. Position them over the edges (you'll know the edges, because they're the things with the seams we just talked about). Note that all 18 (that's 6 faces plus 12 edges) heightmaps are the same size. I suggest 257x257. Or whatever. It's a free country. For any point, p, on the surface of this cube, it's covered by 3 (pretty much) different heightmaps - one which is the face, plus two for the edges it's nearest to. Let's ignore the case where the point is in the middle of a face along one or more dimensions, that's not interesting anyway. So, linearly interpolate the influence of the heightmaps based on proximity to the edges. You want the edge heightmap completely winning out over the face heightmap at the edge, the face heightmap completely winning out over the edge in the center (which is why we ignored the points in the middle of a face just now). And do this symmetrically in both dimensions of the face.

    Eh, Seems like a lot of work. Plus you've got 8 singularities (the corners). You could smooth those out, but that's more work. NEXT!

  • Three-band Solution: So you noticed above that the terrain generated by Beale's program tiles. That's a cool thing about this Fourier stuff. What if we used that to our advantage, and stretched 3 tiles around our cube like rubber bands such that each point on the face was covered by exactly two bands.

    Much less work than above, still the same 8 singularities. I'm not so sure I'm jazzed about smoothing two heightmaps anyway.

  • Let the computer earn its rent: Ok, so as I mentioned above, Mandelbrot started out (I don't even remember if it was him, but let's go with that for now) with looking at wiggly lines that looked a little like the jagged profile of a mountain range. His insight was to bump it up one (integral) dimension, and see if something in the neighborhood of 2.2 would look like mountains, and yeah, they sort of do. So, my thinking now is to try generating something one more dimension up the ladder, and then slice my three-point-something fractal along 6 planes, thus sampling the fractal in 6 different two dimensional planes.

    Erm, yeah. So that's where my terrain generation left off. I also screwed around a bit with the Python Imaging Library and PIDDLE (I'm as embarrassed about that name as you are). That allowed me to get that picture - oh, I didn't stick the URL in yet... right, so it was PIL that made the thumbnails. Gotta downsample the images. You don't need to see multiple megs of solid blue from the one day last summer that it wasn't overcast AND I didn't go into work.

    In amongst the screwing around with image manipulation libraries, I generated myself a PDF of 5 squares to the inch graph paper (with heavier lines every inch). Yes, it's a geeky (sigh) insight into my life that I was never happier as a kid than when I had a fresh pad of graph paper.

    Also, generated a piece of 5-point perspective graph paper, inspired by the work of Dick Termes. Someday, I'd like to generate some of the perspective-bending stuff like Escher's "House of Stairs". I know how I'd approach it, but I'll spare the glazed-eye reader the details today.

    Oh, while I'm at it, is anybody out there a Games Magazine fan? I worked out solutions to the R.O.I. contest, but I only got 1300ish and 260ish as scores, and those each seem awfully low.

    Random other observation: I finally made it to that local-ish pizza place, and I like the fact that it feels like a friendly joint. I wish that it had more parking and more random single local women drifting aimlessly through the front door. Oh, well.

    Ok, I'm winding down. I think that I'll go and watch an hour of Good Eats. And then it's bedtime. I start my new job tomorrow.
  • Subscribe

    • Living is Easy (With Eyes Closed)

      This is really primarily for Cassie, but I rarely post here, so it's also an exercise in "how does LJ work again? Or how does it work today?".…

    • No mudslides for me, thank you.

      Hey, is this thing on? I was just sending email to a mailing list (nothing exciting, don't feel insulted if you're not on it) that was thinking…

    • Trivial

      So, this past weekend, a bunch of my friends / acquaintences / teammates got together and competed in a local trivia competition. There are a few…

    • Post a new comment


      Comments allowed for friends only

      Anonymous comments are disabled in this journal

      default userpic

      Your reply will be screened

      Your IP address will be recorded