Planets! Yay!

I just got my little terrain generator to render the first planets.

The generated terrain is not yet very realistic, the “texture” is just a height-map and the poles (not pictured) look really bad.

Still: success! I managed to get something involving sine and cosine to actually work, sort of. And I regained my sixth grade math skills in the process…

It’s written in Racket, which is a Scheme, which is a Lisp – which doesn’t matter since I have yet to find OpenGL bindings that would not follow that strange standard OpenGL programming style.

However, there are three advantages in using a Lisp over something like C: read, eval, and print.

I’ve build a console into the generator’s main window, which exposes an interactive read-eval-print-loop to the user. It’s not yet hooked up to the generator’s internals but evaluating standard Racket code does work:

(By the way – that sort of thing is not complicated in Racket. About twenty lines of code, including the text-field instantiation.)

When that console is done, debugging and further development can happen interactively – with a live preview, as it were.

Leave a Reply

Your email address will not be published. Required fields are marked *

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.