cs133
play

CS133 Computational Geometry Simplification Algorithms 1 Line - PowerPoint PPT Presentation

CS133 Computational Geometry Simplification Algorithms 1 Line Simplification ? 2 Line Simplification Given a line string and a distance threshold , return a simplified line string such that any point in the input line string is not


  1. CS133 Computational Geometry Simplification Algorithms 1

  2. Line Simplification ? 2

  3. Line Simplification Given a line string and a distance threshold 𝜁 , return a simplified line string such that any point in the input line string is not displaced more than 𝜁 3

  4. Douglas – Peucker Algorithm ≀ 𝜁 4

  5. Douglas – Peucker Algorithm ≀ 𝜁 5

  6. Douglas – Peucker Algorithm 6

  7. Douglas – Peucker Algorithm ≀ 𝜁 7

  8. Douglas – Peucker Algorithm ≀ 𝜁 8

  9. Douglas – Peucker Algorithm ≀ 𝜁 9

  10. Douglas – Peucker Algorithm ≀ 𝜁 10

  11. Douglas – Peucker Algorithm 11

  12. Douglas – Peucker Algorithm 12

  13. Douglas – Peucker Algorithm 13

  14. Running Time function DouglasPeucker(P[], 𝜁 ) // Find the point with the maximum distance (=maximum cross product) cmax = 0 index = 0 for i = 2 to ( end - 1) c = 𝑄 1 𝑄[π‘œ] Γ— 𝑄 1 𝑄[𝑗] if ( c > cmax ) π‘ˆ π‘œ = π‘ˆ π‘œ1 + π‘ˆ π‘œ βˆ’ π‘œ1 + 𝑃 π‘œ index = i cmax = c if (cmax / 𝑄 1 [𝑄 π‘œ > 𝜁 ) { R1 = DouglasPeucker(P[1..index], 𝜁 ) R2 = DouglasPeucker(P[index..n], 𝜁 ) R1.removeLast return R1 || R2 // Concatenate the two lists else return [P[1], P[n]] // Only return the first and last points 14

  15. Polygon Triangulation 15

  16. Polygon Triangulation Given a simple polygon P, break it down into a set of triangles π‘ˆ such that the union of the triangles is equal to the polygon and no two triangles intersect. That is: Ϊ‚ 𝑒 𝑗 βˆˆπ‘ˆ 𝑒 𝑗 = 𝑄 and 𝑒 𝑗 ∩ 𝑒 π‘˜ = 𝜚 for any 𝑒 𝑗 , 𝑒 π‘˜ ∈ π‘ˆ and 𝑗 β‰  π‘˜ 16

  17. Polygon Triangulation 17

  18. Convex Polygons Choose any vertex on the polygon Connect it to all other vertices to create all diagonals Number of possible triangulations is Catalan Number 𝐷 π‘œβˆ’2 2π‘œ 1 2π‘œ! 𝐷 π‘œ = = π‘œ π‘œ+1 π‘œ+1 !π‘œ! 18 By Eric DΓ©trez (as published at www.texample.net in 2008-10-09) - The image is the result of a latex script example published at [1]. All the site is under CC-2.5-by license, as seen on every page of the wite., CC BY 2.5, https://commons.wikimedia.org/w/index.php?curid=56872963

  19. Number of Triangles Number of triangles in a triangulation of a polygon of π‘œ points is π‘œ βˆ’ 2 triangles Can be proven by induction Trivial case: π‘œ = 3 General case: If it applies for all π‘œ < 𝑛 , we need to prove that it applies for π‘œ = 𝑛 That is, we want to prove that if a triangulation exists, it will have 𝑛 βˆ’ 2 triangles 19

  20. Induction π‘œ 1 π‘œ 2 π‘œ 1 + π‘œ 2 = 𝑛 + 1 # of triangles in 𝑄 1 = π‘œ 1 βˆ’ 2 , in 𝑄 2 = π‘œ 2 βˆ’ 2 # of triangles in 𝑄 = π‘œ 1 βˆ’ 2 + π‘œ 2 βˆ’ 2 + 1 = π‘œ 1 + π‘œ 2 βˆ’ 4 + 1 = 𝑛 + 1 βˆ’ 4 + 1 = 𝑛 βˆ’ 2 20

  21. Existence of a Triangulation Any simple polygon has at least one triangulation Proof by induction Trivial case: π‘œ = 3 General case: If there are triangulations for all polygons π‘œ < 𝑛 , we need to prove that there is one for π‘œ = 𝑛 21

  22. Induction 22

  23. Dual Graph Dual graph 𝒣 Each triangle is represented by a vertex in 𝒣 Two triangles that share an edge are connected by an edge in 𝒣 23

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend