610 likes | 879 Views
Optimization of Inverse Snyder Polyhedral Projection. October 5, 2011. Inverse Snyder Optimization. What is Snyder? Inversion Issues Optimizations: Operation Reduction Iteration Reduction Iteration Elimination Results Summary. (NASA, 2000). What is Snyder?.
E N D
Optimization of Inverse Snyder Polyhedral Projection October 5, 2011
Inverse Snyder Optimization • What is Snyder? • Inversion Issues • Optimizations: • Operation Reduction • Iteration Reduction • Iteration Elimination • Results • Summary (NASA, 2000)
What is Snyder? • Projecting Spherical Earth to Planar Map
What is Snyder? • Projecting Spherical Earth to Planar Map F(p) F-1(p) (NASA, 2000) (Google Maps, 2010 – Mercator Projection)
What is Snyder? • Projecting Spherical Earth to Planar Map Mercator Projection
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area Mollweide (NASA, 2000-2006)
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area Mollweide (NASA, 2000-2006) Lambert Azimuthal Equal-Area
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area Werner Mollweide (NASA, 2000-2006) Lambert Azimuthal Equal-Area
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area P P-1
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area (Snyder, 1992)
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area • Industrial applications • in virtual worlds • Truncated Icosahedron: • Angular Deformation: < 3.75o • Scale Variation: < 3.3% • Icosahedron: • Angular Deformation: < 17.27o • Scale Variation: < 16.3% PYXIS Innovation
What is Snyder? • Projecting Spherical Earth to Planar Map • Preserve Area • Industrial applications • in virtual worlds • Truncated Icosahedron: • Angular Deformation: < 3.75o • Scale Variation: < 3.3% • Icosahedron: • Angular Deformation: < 17.27o • Scale Variation: < 16.3% Snyder’s Icosahedron Face
Constructing the Projection • Identify Symmetric Region
Constructing the Projection B’ G g A’ C’
Constructing the Projection B’ B’ G g G g H D’ Az A’ A’ C’ C’
Constructing the Projection B’ B’ B G g G g g H D D’ Az’ Az A’ A’ C A C’ C’
Constructing the Projection • Find planar azimuth: Az’ • Position P’ based on d’ from q • Unwrap azimuth B’ B’ B G g G g g H D D’ Az’ Az A’ A’ C A C’ C’
Constructing the Projection • Find planar azimuth: Az’ • Position P’ based on d’ from q • Unwrap azimuth B’ B’ B G g G g g H D D’ Az’ Az A’ A’ C A C’ C’
Constructing the Projection • Find planar azimuth: Az’ • Position P’ based on d’ from q • Unwrap azimuth linear non-linear, trigonometric functions B’ B’ B G g G g g H D D’ Az’ Az A’ A’ C A C’ C’
Constructing the Projection • Find planar azimuth: Az’ • Position P’ based on d’ from q • Unwrap azimuth B’ B’ B G g G g g H D D’ Az’ Az A’ A’ C A C’ C’
Constructing the Projection non-linear with inverse trig. funcs • Find planar azimuth: Az’ • Position P’ based on d’ from q • Unwrap azimuth B’ B’ B G g G g g H D D’ Az’ Az A’ A’ C A C’ C’
Constructing the Projection non-linear with inverse trig. funcs • Find planar azimuth: Az’ • Position P’ based on d’ from q • Unwrap azimuth B’ B’ B G g G g g H D D’ Az’ Az q d’ A’ A’ C A C’ C’
Constructing the Projection non-linear with inverse trig. funcs • Find planar azimuth: Az’ • Position P’ based on d’ from q • Unwrap azimuth B’ B’ B G g G g g H D D’ Az’ Az q d’ A’ A’ C A C’ C’
Inverse Projection B g C A
Inverse Projection B B g g D Az’ d’ C A C A
Inverse Projection B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Inversion Issues • Find spherical azimuth: Az B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Inversion Issues • Find spherical azimuth: Az linear non-linear, trigonometric functions B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Inversion Issues • Find spherical azimuth: Az linear non-linear, trigonometric functions non-linear, inverse trig. functions B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Inversion Issues • Find spherical azimuth: Az linear Use Iterative Method to Solve For Az non-linear, trigonometric functions non-linear, inverse trig. functions B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Inversion Issues • Frequently called! (PYXIS, 2011)
Optimizations • Operation Reduction B G g H D P Az q A C B’ D’ P’ Az’ d’ C’ A’
Optimizations • Operation Reduction • Iteration Reduction B G g H D P Az q A C B’ D’ P’ Az’ d’ C’ A’
Optimizations • Operation Reduction • Iteration Reduction • Iteration Avoidance B G g H D P Az q A C B’ D’ P’ Az’ d’ C’ A’
Operation Reduction • Reduce repetitive calls • 2π, H • cos and sin calls • Pre-computation of values • Trigonometric calls (eg. sincos)
Operation Reduction • Reduce repetitive calls • 2π, H • cos and sin calls • Pre-computation of values • Trigonometric calls (eg. sincos) • Nominal speed up • Note: No look-up table for cos and sin (would increase error)
Iteration Reduction • Recall finding spherical azimuth: Az linear non-linear, trigonometric functions non-linear, inverse trig. functions B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Iteration Reduction • Recall finding spherical azimuth: Az linear non-linear, trigonometric functions non-linear, inverse trig. functions B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Iteration Reduction • Recall finding spherical azimuth: Az linear non-linear, trigonometric functions non-linear, inverse trig. functions B’ B B G g g g H D D’ Az’ Az q d’ A’ C A C A C’
Iteration Reduction Newton Raphson: Iterative Solution Finding
Iteration Reduction Newton Raphson: Iterative Solution Finding • Idea: Consider treating the iterative solution as a one-dimensional function
Iteration Reduction • Idea: Consider treating the iterative solution as a one-dimensional function
Iteration Reduction Polynomial Approximating Azimuthal Shift
Iteration Reduction • Use polynomial for improved initial estimate of Newton-Raphson
Iteration Elimination • Idea: Skip the iteration entirely, using this approximating function! • Note: Will need to evaluate error
Results Need to: • Determine Runtime Improvements • Contrast Original with Iteration Reduction especially regarding iteration drop • Establish Error for Elimination Approach
Results: Runtime Improvements • Approach: • Profile inverse Snyder method using gprof • Ran 100 times, against four (4) quality levels • Quality: Quality 10 - Flat & Projected
Results: Iteration Reduction • Original vs Reduced