On December 27th 2005 I received a mail from a Mr. Robert Neuman requesting free beer. I tested his fix, checked the positions, and lo and behold it was spot on. He had indeed fixed the problem. The solution was very simple, but something I never thought of. The cause was that calculations was being performed using single-precision floating point numbers.
In addition to the fix Robert has added code for tracking more than 400 new satellites and a satellite info window appearing on mouse-over.
Robert will probably continue to improve this plugin, but here is the version he sent me:
I now have to figure out how to get the promised beer into Robert's system, but at the same time I would like to promise more free beer to the person who can pinpoint the code line(s) causing the huge shift in position. I experienced a 30 degree longitude shift when switching from single to double precision calculations.
Now supports older graphics cards: GeForce 2, GeForce 4, Intel etc.
I would like to thank Patrick Murris a lot for mailing me both red/blue and red/cyan anaglyph glasses. They arrived in the mail yesterday (after just 2 days in the mail) and they enabled me to also finally see 3D. As Patrick told, red/cyan glasses definitely works best when viewing World Wind in 3D. BTW: Developing plug-ins without being able to test was a bit awkward, and is not recommended.
Patrick has both been contributing code (both core and plug-in) to World Wind, and he also (I wasn't aware) has a history in anaglyph 3D. He has made available a collection of amazing anaglyph 3D images:
Changes: Now creates colored anaglyphs, no more grayscale textures used, and render optimization.
Usage: Right click on the Anaglyph item in layer manager and choose Properties to get the settings dialog where you can set angle/distance and filter color parameters.
Why this plug-in? bull_[uk] have been repeatedly requesting this feature since I don't know when (last year)? In addidion jumpjack logged on IRC a few days back looking for advice on his awesome DIY 3D project using mirrors. You'll find info and links on World Wind Forums.
If the Anaglyph plug-in works and you like it, thank jumpjack and bull_[uk]. In addition I would highly suggest building jumpjacks mirror device. This should give you the same kind of 3D effect, but in full color!
Note: Unfortunately I have not yet tried this code myself as I don't have any glasses/materials, so there could be major errors in the maths. Please let me know if it "feels wrong" (after having tried adjusting settings).
Note 2: I know there is an issue when DirectX needs to perform a reset (because of textures in default pool not being disposed). I'll try to work it out (perhaps in the ww core). It is also unnecessary slow, and could be improved in more than one way. For example it renders three images and tosses away the first.
World Wind can not currently display images in any other projection than Equidistant Cylindrical, which is often problematic, especially for those of us who have problems using command-line tools like mapserver & gdalwarp, and even bigger problems compiling the same tools. So I figured this would make a pretty good hack.
The plugin works by loading the source map and dividing it into a grid. Each point in the grid is projected from the source coordinate system into the XYZ coordinates (meters) World Wind uses internally and those are turned into a mesh with the map as the texture. Using this method, images can be loaded without any prior processing by external programs. The sample displays a copy of the blue marble bitmap in Sinusoidal projection.
The code depends on proj.4 (proj.dll) for the actual projection. At the bottom of the plug-in there is an interop class. Thanks to Nowak and Norman Vine for feeding me data, and the proj.4 developers for creating a great library that was also easy to link to. This plug-in does not yet have a UI, projection + coordinate info must be specified inside the source code. I'm publishing it because I think it might be of use to other developers (especially the interop part).
Note: The code may (among other things) also be used to simply convert coordinates between different coordinate systems. Think display/input of values in different coordinates than the default latitude/longitude, etc...
Supported projections: Airy, Aitoff, Albers Equal Area, Apian Globular I, August Epicycloidal, Azimuthal Equidistant, Bacon Globular, Bipolar conic of western hemisphere, Boggs Eumorphic, Bonne (Werner lat_1=90), Cassini, Central Cylindrical, Chamberlin Trimetric, Collignon, Craster Parabolic (Putnins P4), Denoyer Semi-Elliptical, Eckert I, Eckert II, Eckert III, Eckert IV, Eckert V, Eckert VI, Equal Area Cylindrical, Equidistant Conic, Equidistant Cylindrical (Plate Caree), Euler, Fahey, Foucaut Sinusoidal, Foucaut, Gall (Gall Stereographic), General Oblique Transformation, General Sinusoidal Series, Geocentric, Geostationary Satellite View, Ginsburg VIII (TsNIIGAiK), Gnomonic, Goode Homolosine, Hammer & Eckert-Greifendorff, Hatano Asymmetrical Equal Area, Internation Map of the World Polyconic, Kavraisky V, Kavraisky VII, Krovak, Laborde, Lagrange, Lambert Azimuthal Equal Area, Lambert Conformal Conic Alternative, Lambert Conformal Conic, Lambert Equal Area Conic, Larrivee, Laskowski, Lat/long (Geodetic), Lat/long (Geodetic), Lee Oblated Stereographic, Loximuthal, McBride-Thomas Flat-Polar Parabolic, McBryde-Thomas Flat-Polar Quartic, McBryde-Thomas Flat-Polar Sine, McBryde-Thomas Flat-Polar Sinusoidal, McBryde-Thomas Flat-Pole Sine (No. 2), Mercator, Miller Cylindrical, Miller Oblated Stereographic, Mod. Stererographics of 48 U.S., Mod. Stererographics of 50 U.S., Mod. Stererographics of Alaska, Modified Polyconic, Mollweide, Murdoch I, Murdoch II, Murdoch III, Near-sided perspective, Nell, Nell-Hammer, New Zealand Map Grid, Nicolosi Globular, Oblated Equal Area, Oblique Cylindrical Equal Area, Oblique Mercator, Oblique Stereographic Alternative, Ortelius Oval, Orthographic, Perspective Conic, Polyconic (American), Putnins P1, Putnins P2, Putnins P3', Putnins P3, Putnins P4', Putnins P5', Putnins P5, Putnins P6', Putnins P6, Quartic Authalic, Rectangular Polyconic, Robinson, Sinusoidal (Sanson-Flamsteed), Space oblique for LANDSAT, Stereographic, Swiss. Obl. Mercator, Tilted perspective, Tissot Conic, Transverse Central Cylindrical, Transverse Cylindrical Equal Area, Transverse Mercator, Two Point Equidistant, Universal Polar Stereographic, Universal Transverse Mercator (UTM), Urmaev Flat-Polar Sinusoidal, Urmaev V, Vitkovsky I, Wagner I (Kavraisky VI), Wagner II, Wagner III, Wagner IV, Wagner V, Wagner VI, Wagner VII, Werenskiold I, Winkel I, Winkel II, Winkel Tripel, van der Grinten (I), van der Grinten II, van der Grinten III, van der Grinten IV.
Installation: Put the proj.dll file in worldwind.exe directory. Put the reproject.cs file in the sub-directory "Plugins". The sinusoidal sample image should download from this site once the plug-in is enabled.