In: Wagner W., Szekely, B. (eds.): ISPRS TC VII Symposium - 100 Years ISPRS, Vienna, Austria, July 5-7, 2010, IAPRS, Vol. XXXVIII, Part 7B
number is changed to l-> 129, the mod(129,129)=0.
X = (N + H) cos B cos L
Y = [jV(l -e 2 ) + //]sin B
Z = (N + H) cos B sin L
a
( i )
where
N =
vr
e 2 sin 2 B
a
a = 1738000m, b = 1737400m
a
Figure 6 (a): Before a change in viewpoint
Moving direction Updated zone
Visible zone
lunar long radius, and b is short radius. For reducing
the CPU’ burden and optimizing efficiency, we can
implement the equation by GPU.
3.3 Spherical view range culling
As shown in Figure 7, for optimizing efficiency,
we use view range culling and back face culling
algorithm to eliminate invalid data.
Updating zone
Figure 6 (b): After a change in viewpoint to the
southeast
Figure 6: An example of the data in the heightmap
(top) and toroidal array (bottom).before and after a
change in viewpoint. The position of the viewer in the
heightmap is shown by the red dot.
3.2 Transformation of planar terrain to
spherical terrain
The test data is Lunar DEM and image in WGS84
coordinate system. If the coordinate of a grid point is
(B, L, H) , w h ere B is longitude, L is latitude,
and H is elevation. We must transform the WGS84
coordinate system to OpenGL world space coordinate
system for spherical terrain rendering.
According to Eq.(3), we can transform the WGS84
coordinate system to OpenGL world space coordinate
system.
Figure 7: Data culling based on viewpoint and
visible face
As shown in Figure 8, the spherical terrain can be
divided into two parts. One part is face to viewpoint
n'h'
and one part is back to viewpoint. The a ° in back
to viewpoint part is in view cone, but it is invisible to
viewer. So we must eliminate it with spherical view
range culling algorithm:
Figure 8: spherical view range culling