Procedurally generated planet renderer

This is a program I wrote in Scratch to create renders of procedurally generated planets. The terrain and ocean are spheres, and their surfaces are offset by layers of procedural noise, creating mountains on land and waves in the oceans. To render a 3D image of the planets, ray marching is used, with a constant step size once the ray is close enough to the planet, to mitigate the possibility of rays overshooting. Once an intersection is found, a shadow ray is cast to determine light visibility, and then lighting calculations for Lambertian diffuse shading and Blinn-Phong specular highlights are done to create the final color.

This project was added as a featured project to the front page of TurboWarp.

A planet generated by the program

Adjust the noise offsets to affect what the planet will look like, then click the empty space to render.

The project draws at gradually increasing resolutions so a quick preview can be seen quickly and to allow users to wait as long as they like to get a resolution they're happy with.