|
|
"PM 2Ring" <nomail@nomail> wrote:
> "Mike Sobers" <sob### [at] mindspringcom> 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.
>
> 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.
If you want, I can post a link to the source files, and hand the project
back over to you. I don't think I'll have time to work on them much in the
near future. The only reason I went to BMP is because I am using Windows,
and I wanted immediate feedback on the look of the craterfield. Also, the
random number generator didn't work when I compiled it under Microsoft
Visual Studio (something about the syntax on the bit shift commands) so it
only produced 1 crater at X,Y = 0,0. Other than that, it would probably be
better to have a PGM output, especially since that could get you to 16 bit.
I was going to include .jpg and .png output options, but I didn't want to
have to wade through the class definitions to pick out the small bit of
code I wanted. As it stands, the executible is only 183k and I wanted to
keep it small. Besides, the complied version I made will probably only run
under Windows anyway.
Mike
PS - same scene, different lighting
Post a reply to this message
Attachments:
Download 'mars_craters2.jpg' (48 KB)
Preview of image 'mars_craters2.jpg'
|
|