Torben Ęgidius Mogensen has developed an algorithm for generating synthetic planets which takes inspiration from fractal midpoint subdivision and from noise synthesis. He has posted the algorithm to Usenet, so the DejaNews archives should have it available, and the source code is available from his web page. This page presents a partial Java "port" of his program.
What this program does is to select points within the unit cube that correspond to points on the surface of a sphere; the exact points which are selected depend on the map projection which is selected. Noise is calculated at each of these points by an intriguing method; when I understand the technique better I will include a better description. One thing that I find very interesting about Mogensen's approach is that his random() function is defined as a function of two numbers, is reflexive, and allows a planet to be built from a single seed value.
MORE TO FOLLOW
This applet was compiled for JDK 1.1, and might not run with a browser that only supports JDK 1.0.2. It is not optimized for speed, nor has the interface been polished beyond a simple FlowLayout.
Please be patient: it can take 10-20 seconds to generate each image.
The original C source code for the program is available at Torben's web page. The Java source is organized as follows:
I am providing my source code under the same restrictions that are imposed by the original author. As he explained to me in a private communication, he considers the publication of his planet program on the Web to be analogous to publication in a scientific journal or similar medium; people have the right to use the source code for any purpose, private or commercial, without fee. However, he does expect anybody using that code to provide a reference to his source code, in the same way that anyone using material from a journal article would be expected to include a reference to that article. So, if you use Mr. Mogensen's code, you need to give him credit for his work and make sure the users of your software have enough information to get the original source code and documentation for themselves. If you use my Java port of his code, you need to reference this page as well as Mr. Mogensen's page.
This software is provided with absolutely no warranty.
Up to my terrain page
Back to my home page
© 1996 firstname.lastname@example.org