Monday, September 1, 2008

Truncated Earth in World Wind Java

I wanted to try this for a while and i'm pleased to see it works rather well considering how little code is involved. Here is a simple World Wind Java example application that will produce a truncated globe.


Download TruncatedEarth.java, remove the .txt extension and add to the SDK examples package.

Update Nov. 20: once again there appear to be a dependency on the not yet publish SDK 0.6. Please check this forum post for a workaround with version 0.5.

The code illustrates how to extend and override the globe elevation model to 'take out' a slice of the planet. Although rough coloring of the section interior is easily done with some gradients and surface images, placing a texture on the section side would require a bit more then that.

1 comment:

Anonymous said...

Hi, could you please explain how to
get it worked?
1. I downloaded this:
http://www.alpix.com/3d/worldwin/WWJ/TruncatedEarth.java.txt

2. I renamed it in
TruncatedEarth.java

3. I added it to the package
gov.nasa.worldwind.examples

but it doesn't work... =/
There are some errors and it doesn't start!