optimization of inverse snyder polyhedral projection

60
Optimization of Inverse Snyder Polyhedral Projection Erika Harrison [email protected] Ali Mahdavi- Amiri [email protected] Faramarz Samavati [email protected] Dept. of Computer Science University of Calgary October 5, 2011

Upload: khuyen

Post on 06-Jan-2016

62 views

Category:

Documents


3 download

DESCRIPTION

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?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Optimization of Inverse Snyder Polyhedral Projection

Optimization of Inverse Snyder Polyhedral Projection

Erika [email protected]

Ali [email protected]

Faramarz [email protected]

Dept. of Computer Science

University of Calgary

Calgary, Canada

October 5, 2011

Page 2: Optimization of Inverse Snyder Polyhedral Projection

2

Inverse Snyder Optimization

• What is Snyder?

• Inversion Issues

• Optimizations:– Operation Reduction– Iteration Reduction– Iteration Elimination

• Results

• Summary (NASA, 2000)

Page 3: Optimization of Inverse Snyder Polyhedral Projection

3

What is Snyder?

• Projecting Spherical Earth to Planar Map

Page 4: Optimization of Inverse Snyder Polyhedral Projection

4

What is Snyder?

• Projecting Spherical Earth to Planar Map

F-1(p)

F(p)

(Google Maps, 2010 – Mercator Projection)(NASA, 2000)

Page 5: Optimization of Inverse Snyder Polyhedral Projection

5

What is Snyder?

• Projecting Spherical Earth to Planar Map

Mercator Projection

Page 6: Optimization of Inverse Snyder Polyhedral Projection

6

What is Snyder?

• Projecting Spherical Earth to Planar Map

• Preserve Area

Page 7: Optimization of Inverse Snyder Polyhedral Projection

7

What is Snyder?

• Projecting Spherical Earth to Planar Map

• Preserve Area

(NASA, 2000-2006)

Mollweide

Page 8: Optimization of Inverse Snyder Polyhedral Projection

8

What is Snyder?

• Projecting Spherical Earth to Planar Map

• Preserve Area

Mollweide

Lambert Azimuthal Equal-Area

(NASA, 2000-2006)

Page 9: Optimization of Inverse Snyder Polyhedral Projection

9

What is Snyder?

• Projecting Spherical Earth to Planar Map

• Preserve Area

MollweideWerner

Lambert Azimuthal Equal-Area

(NASA, 2000-2006)

Page 10: Optimization of Inverse Snyder Polyhedral Projection

10

What is Snyder?

P-1

P

• Projecting Spherical Earth to Planar Map

• Preserve Area

Page 11: Optimization of Inverse Snyder Polyhedral Projection

11

What is Snyder?

• Projecting Spherical Earth to Planar Map

• Preserve Area

(Snyder, 1992)

Page 12: Optimization of Inverse Snyder Polyhedral Projection

12

What is Snyder?

• Projecting Spherical Earth to Planar Map

• Preserve Area

PYXIS Innovation

• Industrial applications in virtual worlds

Truncated Icosahedron:• Angular Deformation: < 3.75o

• Scale Variation: < 3.3%

Icosahedron:• Angular Deformation: < 17.27o

• Scale Variation: < 16.3%

Page 13: Optimization of Inverse Snyder Polyhedral Projection

13

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

Page 14: Optimization of Inverse Snyder Polyhedral Projection

14

Constructing the Projection

• Identify Symmetric Region

Page 15: Optimization of Inverse Snyder Polyhedral Projection

15

Constructing the Projection

A’

B’

C’

G g

Page 16: Optimization of Inverse Snyder Polyhedral Projection

16

A’

B’

C’

G g

Constructing the Projection

A’

B’

C’

G gD’

AzH

Page 17: Optimization of Inverse Snyder Polyhedral Projection

17

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

Page 18: Optimization of Inverse Snyder Polyhedral Projection

18

• Find planar azimuth: Az’

• Position P’ based on d’ from q

• Unwrap azimuth

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

Page 19: Optimization of Inverse Snyder Polyhedral Projection

19

• Find planar azimuth: Az’

• Position P’ based on d’ from q

• Unwrap azimuth

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

Page 20: Optimization of Inverse Snyder Polyhedral Projection

20

• Find planar azimuth: Az’

• Position P’ based on d’ from q

• Unwrap azimuth

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

linear

non-linear, trigonometric functions

Page 21: Optimization of Inverse Snyder Polyhedral Projection

21

• Find planar azimuth: Az’

• Position P’ based on d’ from q

• Unwrap azimuth

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

Page 22: Optimization of Inverse Snyder Polyhedral Projection

22

• Find planar azimuth: Az’

• Position P’ based on d’ from q

• Unwrap azimuth

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

non-linear with

inverse trig. funcs

Page 23: Optimization of Inverse Snyder Polyhedral Projection

23

• Find planar azimuth: Az’

• Position P’ based on d’ from q

• Unwrap azimuth

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

non-linear with

inverse trig. funcs

q d’

Page 24: Optimization of Inverse Snyder Polyhedral Projection

24

• Find planar azimuth: Az’

• Position P’ based on d’ from q

• Unwrap azimuth

A’

B’

C’

G g

A

B

C

Constructing the Projection

A’

B’

C’

G gD’

AzD

Az’H

g

non-linear with

inverse trig. funcs

q d’

Page 25: Optimization of Inverse Snyder Polyhedral Projection

25

A

B

C

Inverse Projection

g

Page 26: Optimization of Inverse Snyder Polyhedral Projection

26

A

B

C

DAz’

d’

g

A

B

C

g

Inverse Projection

Page 27: Optimization of Inverse Snyder Polyhedral Projection

27

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

Inverse Projection

Page 28: Optimization of Inverse Snyder Polyhedral Projection

28

Inversion Issues

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

• Find spherical azimuth: Az

Page 29: Optimization of Inverse Snyder Polyhedral Projection

29

Inversion Issues

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

• Find spherical azimuth: Azlinear

non-linear, trigonometric functions

Page 30: Optimization of Inverse Snyder Polyhedral Projection

30

Inversion Issues

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

• Find spherical azimuth: Azlinear

non-linear, trigonometric functions

non-linear, inverse trig. functions

Page 31: Optimization of Inverse Snyder Polyhedral Projection

31

non-linear, trigonometric functions

Inversion Issues

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

• Find spherical azimuth: Azlinear

non-linear, inverse trig. functions

Use IterativeMethod to Solve

For Az

Page 32: Optimization of Inverse Snyder Polyhedral Projection

32

Inversion Issues

• Frequently called!

(PYXIS, 2011)

Page 33: Optimization of Inverse Snyder Polyhedral Projection

33

Optimizations

1. Operation Reduction

A

B

C

G g

A’

B’

C’

DAz

D’Az’

q

d’

H P

P’

Page 34: Optimization of Inverse Snyder Polyhedral Projection

34

Optimizations

1. Operation Reduction

2. Iteration ReductionA

B

C

G g

A’

B’

C’

DAz

D’Az’

q

d’

H P

P’

Page 35: Optimization of Inverse Snyder Polyhedral Projection

35

Optimizations

1. Operation Reduction

2. Iteration Reduction

3. Iteration Avoidance

A

B

C

G g

A’

B’

C’

DAz

D’Az’

q

d’

H P

P’

Page 36: Optimization of Inverse Snyder Polyhedral Projection

36

Operation Reduction

• Reduce repetitive calls– 2π, H– cos and sin calls

• Pre-computation of values

• Trigonometric calls (eg. sincos)

Page 37: Optimization of Inverse Snyder Polyhedral Projection

37

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)

Page 38: Optimization of Inverse Snyder Polyhedral Projection

38

Iteration Reduction

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

linear

non-linear, trigonometric functions

non-linear, inverse trig. functions

• Recall finding spherical azimuth: Az

Page 39: Optimization of Inverse Snyder Polyhedral Projection

39

Iteration Reduction

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

linear

non-linear, trigonometric functions

non-linear, inverse trig. functions

• Recall finding spherical azimuth: Az

Page 40: Optimization of Inverse Snyder Polyhedral Projection

40

Iteration Reduction

A’

B’

C’

G g

A

B

C

D’Az

DAz’q d’

Hg

A

B

C

g

linear

non-linear, trigonometric functions

non-linear, inverse trig. functions

• Recall finding spherical azimuth: Az

Page 41: Optimization of Inverse Snyder Polyhedral Projection

41

Iteration ReductionNewton Raphson: Iterative Solution Finding

Page 42: Optimization of Inverse Snyder Polyhedral Projection

42

Iteration ReductionNewton Raphson: Iterative Solution Finding

• Idea: Consider treating the iterative solution as a one-dimensional function

Page 43: Optimization of Inverse Snyder Polyhedral Projection

43

Iteration Reduction

• Idea: Consider treating the iterative solution as a one-dimensional function

Page 44: Optimization of Inverse Snyder Polyhedral Projection

44

Iteration Reduction

PolynomialSum of Squares of

ResidualsVariance ofResiduals

Degree 1 1.19E+00 2.02E-04

Degree 2 9.72E-01 1.66E-04

Degree 3 2.30E-04 3.92E-08

Degree 4 2.06E-04 3.51E-08

Degree 5 2.51E-05 4.28E-09

Degree 6 2.20E-05 3.75E-09

Degree 7 9.06E-07 1.55E-10

Polynomial Approximating Azimuthal Shift

Page 45: Optimization of Inverse Snyder Polyhedral Projection

45

Iteration Reduction

• Use polynomial for improved initial estimate of Newton-Raphson

Page 46: Optimization of Inverse Snyder Polyhedral Projection

46

Iteration Elimination

• Idea: Skip the iteration entirely, using this approximating function!

• Note: Will need to evaluate error

Page 47: Optimization of Inverse Snyder Polyhedral Projection

47

Results

Need to:

• Determine Runtime Improvements

• Contrast Original with Iteration Reduction especially regarding iteration drop

• Establish Error for Elimination Approach

Page 48: Optimization of Inverse Snyder Polyhedral Projection

48

Results: Runtime Improvements

• Approach: – Profile inverse Snyder method using gprof– Ran 100 times, against four (4) quality levels

• Quality:

Quality 10 - Flat & Projected

Page 49: Optimization of Inverse Snyder Polyhedral Projection

49

Results: Runtime Improvements

Profiling Time

0

0.02

0.04

0.06

0.08

0.1

0.12

25 50 75 100

Quality

Ave

rag

e T

ime

(s)

Original

Reduction

Elimination

Page 50: Optimization of Inverse Snyder Polyhedral Projection

50

Results: Iteration Reduction

• Original vs ReducedAverage Iterations

0

0.5

1

1.5

2

2.5

3

3.5

4

25 50 75 100

Quality

Ave

rag

e It

erat

ion

s

Original

Reduction

Page 51: Optimization of Inverse Snyder Polyhedral Projection

51

• Original vs Reduced

• Recall: Skip has no iterations

Results: Iteration Reduction

Average Iterations

0

0.5

1

1.5

2

2.5

3

3.5

4

25 50 75 100

Quality

Ave

rag

e It

erat

ion

s

Original

Reduction

Page 52: Optimization of Inverse Snyder Polyhedral Projection

52

Results: Iteration ReductionQuality 10 Quality 30 Quality 60 Quality 100

Original

- 4 iterations - 3 Iterations - 2 Iterations - 0 or 1 Iterations

Page 53: Optimization of Inverse Snyder Polyhedral Projection

53

Results: Iteration Reduction

Original

Reduced

Quality 10 Quality 30 Quality 60 Quality 100

- 4 iterations - 3 Iterations - 2 Iterations - 0 or 1 Iterations

Page 54: Optimization of Inverse Snyder Polyhedral Projection

54

Results: Iteration Reduction

Original Reduced

- 4 iterations - 3 Iterations - 2 Iterations - 0 or 1 Iterations

Page 55: Optimization of Inverse Snyder Polyhedral Projection

55

Results: Error Check• Original vs Eliminated Approach

QualityAvg. Dist.

ErrorMax Dist.

ErrorAvg. AreaError (%)

Max AreaError (%)

25 9.38e-05 6.19e-04 1.98e-05 1.60e-02

50 9.44e-05 6.19e-04 9.22e-06 2.20e-02

75 9.46e-05 6.19e-04 3.33e-06 3.50e-02

100 9.49e-05 6.19e-04 1.76e-06 5.07e-02

Page 56: Optimization of Inverse Snyder Polyhedral Projection

56

Results: Error Check• Original vs Eliminated Approach

QualityAvg. Dist.

ErrorMax Dist.

ErrorAvg. AreaError (%)

Max AreaError (%)

25 9.38e-05 6.19e-04 1.98e-05 1.60e-02

50 9.44e-05 6.19e-04 9.22e-06 2.20e-02

75 9.46e-05 6.19e-04 3.33e-06 3.50e-02

100 9.49e-05 6.19e-04 1.76e-06 5.07e-02

On the Earth:Average Distance Error: 5.90mAverage Areal Error: 714 m2

Page 57: Optimization of Inverse Snyder Polyhedral Projection

57

Results: Error CheckDistance Error Areal Error (Percent)

Displacement in: - No error- Increase- Decrease

- X- Y- Z

- Uniform- None

Page 58: Optimization of Inverse Snyder Polyhedral Projection

58

Summary

• Definite Improvement– 45% time reduction when skipping iteration– 25% iteration reduction

• Nominal Error on Elimination Approach– 8.5 x 10-6% (714 m2) average areal change– 5.9 m distance error– Useful at coarse resolutions

Page 59: Optimization of Inverse Snyder Polyhedral Projection

59

Conclusion

Result: Determined an effective association of planar data to a spherical world

Page 60: Optimization of Inverse Snyder Polyhedral Projection

60

Questions?

Result: Determined an effective association of planar data to a spherical world