|
![](/i/fill.gif) |
"Mike Sobers" <sob### [at] mindspring com> wrote:
> I compiled the crater field generator code by PM 2Ring with a few
> modifications:
Thanks, Mike. To be truthful, the original crater code is by John Walker of
Autodesk (& Fourmilab) and Rudy Rucker developed the random distribution
algorithm. I just fixed it up a little bit & made it output as a
heightfield.
> New functionality:
>
> 1) If desired, large craters can now have a central peak.
Excellent! FWIW, the main crater code conserves volume, although this is
disturbed a bit by the code that 'blends' the outer wall onto the existing
ground. The program assumes that the volume of the impacting meteor is
negliglible, so I suppose it's also ok to ignore the extra volume of the
central peak.
> 2) You can specify erosion - the program will average the pixels the
> specified
> number of times to simulate eroded craters.
That's very handy for places like Mars.
> 3) Output is to .bmp instead of PGM. Unfortunately, in this current version
> it's a 24-bit file with only 8 bits of info, so an 8000 x 8000 crater field
> produces an output file somewhere around 187 MB. But you can always
> convert to .png after you make the .bmp output file. Maybe I'll eventually
> re-write this to produce 16-bit output (.pgm, .tga, or .png).
I stuck with PGM because many NetPBM programs can process data in a
pipeline, reading line by line, so you can avoid writing huge files to
disk. BMP isn't so good for POV since it can only be read & written by the
Windows version, IIRC.
Funny, I was just thinking about fixing it do 16 bit on the weekend...
> Also, maybe I'll create an option to import an existing hightfield. That
> would allow you to use a pregenerated landscape and then subject it to a
> meteor storm. Thoughts?
Sounds good to me, and it shouldn't be too hard to implement.
Post a reply to this message
|
![](/i/fill.gif) |