SlideShare a Scribd company logo
1 of 32
Download to read offline
ALBERTO   MINETTI
  PAOLA   MAIOLINO

                     1
SOMMARIO
• Query su mesh navigabili senza indici
• Strutture ausiliarie: alberi di ricerca
• Quadtree, PR-quadtree e location code

• PR3T-quadtree
• PM-quadtree: PM2-quadtree
• PM2T-quadtree

• Analisi costi
• Analisi performance




                                            2
QUERY SU MESH IN 2D
Location query
  trovare i triangoli che contengono un punto (x,y)


Window query
  trovare i triangoli che intersecano un rettangolo
                       (xmin,xmax,ymin,ymax)


Range query
  trovare i triangoli che intersecano un cerchio
                                     (x,y,radius)


                                                      3
QUERY SU MESH NAVIGABILI
Quale triangolo contiene il punto (300,200)?                      t   TV           TE          TT
                                                                  A 1,2,7          a,h,g λ,B,λ
v   coord     VV      VE      VT    e   EV    EE        ET        B 2,3,7          b,i,h       λ,C,A
1 30,350      7,2     g,a     A     a   1,2   g,g,h,b A,λ         C 3,4,7          c,j,i       λ,D,B
2 160,330     3,7,1   b,h,a B,A     b   2,3   h,a,i,c   B,λ       D 4,5,7          d,k,j       λ,E,C
                                    c   3,4   i,b,j,d   C,λ
3 315,430     4,7,2   c,i,b   C,B                                 E 5,6,7          e.f.k       λ,λ,D
                                    d   4,5   j,c,k,e   D,λ
4 450,335     5,7,3   d,j,c   D,C                             O                    6
                                    e   5,6   k,d,f,f   E,λ
                                                                                           e
5 375,160     6,7,4   e,k,d E,D     f   6,7   e,e,k,g E,λ                          f E
                                                                                                       5
6 250,40      7,5     f,e     E     g   7,1   h,f,a,a   A,λ                    7           k
                                                                                               D
7 225,190      1,2,3, g,h,i, A,B,   h   7,2   i,g,b,a   B,A                                j           d
                                                                      g
               4,5,6 j,k,f C,D,     i   7,3   j,h,c,b   C,B                            i
                                                                          A h                  C
                              E,F   j   7,4   k,i,d,c   D,C                                                4
                                                              1                    B
    O(#triangoli) anche nel caso                                      a                            c
                                    k   7,5   f,j,e,d   E,D                        b
       peggiore con le svolte                                              2               3
                                                                                                       4
INDICE SPAZIALE
• Struttura ausiliaria
  • Non fa parte della mesh

• Suddivide le regioni
  • Regole di divisione
 • Ricerca limitata a tot regioni

• Ogni regione contiene info
  • Dominio (estremi)
  • Vertici all’interno
  • Triangoli intersecati
  • Edge intersecati

• Rapido accesso all’indice
  • Strutture di tipo albero

                                              5
ALBERO
Grafo diretto
• Aciclico
• Connesso
• Senza sotto-alberi condivisi
• Una sola radice

Elimineremo nodi interni e puntatori




                                       6
BINARY SEARCH TREE
Ricerca in una dimensione

L’elemento 64 è presente nell’albero?

Cammino:
  60,74,65,63,64!




Complessità logaritmica

                                         7
POINT REGION QUADTREE
Indice per punti nello spazio bidimensionale




                                               8
POINT REGION QUADTREE (SITUAZIONE INIZIALE)
Ogni punto in una regione/foglia dell’albero
Dividiamo le regioni sempre in 4 ricorsivamente




                                                  9
POINT REGION QUADTREE (INSERIEMENTO DI A E B)



                  A




           B




                                           10
POINT REGION QUADTREE (A E B INSERITI)



               A




       B




                                         11
POINT REGION QUADTREE (INSERIMENTO DI C E D)



                  A
    C




           B
                      D



                                          12
POINT REGION QUADTREE (C INSERITO)



             A
C




      B
                 D



                                     13
POINT REGION QUADTREE (C E D INSERITI)



               A
 C




       B
                   D



                                         14
POINT REGION QUADTREE (INSERIMENTO DI E)



                   A
               E
  C




         B
                       D



                                           15
POINT REGION QUADTREE (INSERIMENTO DI E)



                   A
               E
  C




         B
                       D



                                           16
POINT REGION QUADTREE (E INSERITO)



                A
            E
C




      B
                    D



                                     17
POINT REGION QUADTREE (E INSERITO)




C



       B     D



                                         18
POINT REGION QUADTREE
           C
                                 B D   F
               K   J   A   E N L M P       G H




                                           19
PR-QUADTREE (CONSIDERAZIONI)
Struttura non dipende dall’ordine di inserimento dell’albero

Ogni nodo dell’albero rappresenta una regione nello spazio 2D

Ogni nodo dell’albero può contenere solo un punto
Spazio diviso sempre in quattro quadranti di ugual dimensione

Inserimento ricorsivo finché la foglia vuota non viene trovata/creata

Un singolo inserimento può aumentare di molti livello l’albero
  se i punti sono particolarmente vicini
Minore è la distanza tra i punti, maggiore sarà la profondità dell’albero



                                                                            20
POINTER-LESS RAPPRESENTATION
Evitiamo di memorizzare:
• I puntatori (4 per ogni nodo interno)
• Nodi interni

Memorizziamo solo i nodi foglia con relativo location code che
  codifica il cammino all’interno dell’albero per arrivarci

Si evita di memorizzare una grande quantità di puntatori e di nodi
   all’interno dell’albero

Diversi metodi per realizzarlo

              Irene Gargantini, An Effective Way to Rapresent Quadtrees, 1982


                                                                         21
INDICI PER MESH POLIGONALI
PM3T-quadtree
• Memorizza triangoli
• Stessa divisione dei PR-quadtree

PM2-quadtree
• Memorizza edge
• Qualsiasi polygon map non solo triangoli
• Divisione regioni più fine

PM2T-quadtree
• Memorizza triangoli
• Divisione regioni più fine


                                             22
PM3T QUADTREE
Estensione del PR-quadtree per mesh triangolari
Divisione spaziale sui vertici identica al PR-quadtree
Una foglia può contenere un vertice e la lista dei triangoli intersecati

vi: x, y, z          3N
t i : v 1, v 2 , v 3 3T ≈ 6N (Eulero)
li: loc, v, list* 3LN + 2TL
LN è il numero di foglie dell’indice
TL è la lunghezza di tutte le liste di triangoli

 Handle/Manico della lista

       Ogni nodo della lista contiene l’indice del
      triangolo e il puntatore al successivo nodo


                                                                     23
CLASSE DEI PM QUADTREE
Simili ai PR-quadtree, ma definiti su polygon map
• Alberi di ricerca quaternari
• Memorizzano i punti all’interno della regione
• Memorizzano anche gli spigoli
• Il partizionamento definito rispetto ai vertici con regole aggiuntive




                                                                    24
PM2 QUADTREE
Estensione del PM-quadtree
Divisione spaziale più fine del PR-quadtree (e del PM3T-quadtree)
Una foglia può contenere un vertice e la lista degli edge intersecati
1) Una foglia/regione che
contiene un vertice può
intersecare solo edge che
incidono su tale vertice

2) Una foglia/regione che non
contiene un vertice può
intersecare solo edge che
incidono sullo stesso vertice
esterno al blocco

                                                                   25
PM2 QUADTREE (COSTO)
Funziona per qualsiasi poligono, non solo triangoli

A causa delle regole 1 e 2 abbiamo, in generale, più regioni/foglie
   rispetto ad un PM3T-quadtree e quindi LN sarà maggiore

vi: x, y, z       3N
ei: v1, v2        2E ≈ 6N (formula di Eulero)

li: loc, list*    2LN + 2EL
   il vertice all’interno di una foglia è facilmente ricavabile
          (gli edge nella lista hanno tutti un vertice comune)

LN è il numero di foglie dell’indice
EL è la lunghezza di tutte le liste di edge

                                                                  26
PM2T QUADTREE
Estensione del PR-quadtree per mesh triangolari
Divisione spaziale più fine del PR-quadtree (e del PM3T-quadtree)
Una foglia può contenere un vertice e la lista dei triangoli intersecati
1) Una foglia/regione che
contiene un vertice può
intersecare solo triangoli che
incidono su tale vertice

2) Una foglia/regione che non
contiene un vertice può
intersecare solo triangoli che
incidono sullo stesso vertice
esterno al blocco

                                                                     27
PM2T QUADTREE (TIPO FOGLIA)
4 differenti tipi di foglia/regione:
Foglia completamente vuota ha tipo -1

Foglia intersecata da almeno 3 triangoli ha come tipo l’indice v del
  vertice condiviso, triangoli memorizzati non esplicitamente
  v è un numero intero positivo

Foglia intersecata da 1 solo triangolo t ha come tipo l’indice del
  triangolo come –2(t+1) negativo pari             –(tipo/2)–1

Foglia intersecata da 2 triangoli t1 e t2 memorizza l’indice di uno dei
  triangoli come –2(t1+1)+1 o –2(t2+1)+1 negativo dispari
  in modo che sia diverso da -1              ((1–tipo)/2)–1

                                                                     28
PM2T QUADTREE (COSTO)
A causa delle regole 1 e 2 abbiamo, in generale, più regioni/foglie
   rispetto ad un PM3T-quadtree e quindi LN sarà maggiore

vi: x, y, z, t                      4N
t i : v1 , v2 , v3, t 1 , t 2 , t 3 6T ≈ 12N (formula di Eulero)
      (classica struttura indicizzata con adiacenze)

li: loc, tipo                              2LN        (nessuna lista)
   grazie al tipo e alle relazioni tra vertici e triangoli possiamo navigare la mesh

LN è il numero di foglie dell’indice
LN ≈ 5N per dati sintetizzati (63% in più rispetto alla struttura classica)
LN ≈ 6N per dati reali (75% in più rispetto alla struttura classica)

     De Floriani, Fancinoli, Magillo, Dimitri; A HIERARCHICAL SPATIAL INDEX FOR TRIANGULATED SURFACES; 2008

                                                                                                      29
ANALISI: STRUTTURA DELL’ALBERO




                 De Floriani, Fancinoli, Magillo, Dimitri; A
                     HIERARCHICAL SPATIAL INDEX FOR
                       TRIANGULATED SURFACES; 2008

                                                        30
ANALISI: OCCUPAZIONE




           Table: Depth of the tree, number of leaf
            nodes, and storage costs on real data

            Rome 957’456 vertices 1’914’867 triangles
           Dolomites 810’000 vertices 1’619’963 triangles


             De Floriani, Fancinoli, Magillo, Dimitri; A
                 HIERARCHICAL SPATIAL INDEX FOR
                   TRIANGULATED SURFACES; 2008

                                                      31
ANALISI: PERFORMANCE
Point location: trovare il triangolo che contiene un punto
Costo: discesa nell’albero per trovare la regione che contiene il
  punto + test di point-in-triangle per ogni triangolo nella regione
                                                                                   Meno svolte
                                                                                 (pesanti a causa
                                                                                dell’aritmetica FP)

                                                                              Varianza minore: caso
                                                                            peggiore vicino alla media



                                                                             Più nodi visitati a causa
                                                                             della maggior profondità
                                                                                    dell’albero
              Meno triangoli controllati
(Per i PM2-quadtree si ha informazione solo sugli edge quindi il calcolo diventa complesso)
     De Floriani, Fancinoli, Magillo, Dimitri; A HIERARCHICAL SPATIAL INDEX FOR TRIANGULATED SURFACES; 2008

                                                                                                      32

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Index for meshes 2d

  • 1. ALBERTO MINETTI PAOLA MAIOLINO 1
  • 2. SOMMARIO • Query su mesh navigabili senza indici • Strutture ausiliarie: alberi di ricerca • Quadtree, PR-quadtree e location code • PR3T-quadtree • PM-quadtree: PM2-quadtree • PM2T-quadtree • Analisi costi • Analisi performance 2
  • 3. QUERY SU MESH IN 2D Location query trovare i triangoli che contengono un punto (x,y) Window query trovare i triangoli che intersecano un rettangolo (xmin,xmax,ymin,ymax) Range query trovare i triangoli che intersecano un cerchio (x,y,radius) 3
  • 4. QUERY SU MESH NAVIGABILI Quale triangolo contiene il punto (300,200)? t TV TE TT A 1,2,7 a,h,g λ,B,λ v coord VV VE VT e EV EE ET B 2,3,7 b,i,h λ,C,A 1 30,350 7,2 g,a A a 1,2 g,g,h,b A,λ C 3,4,7 c,j,i λ,D,B 2 160,330 3,7,1 b,h,a B,A b 2,3 h,a,i,c B,λ D 4,5,7 d,k,j λ,E,C c 3,4 i,b,j,d C,λ 3 315,430 4,7,2 c,i,b C,B E 5,6,7 e.f.k λ,λ,D d 4,5 j,c,k,e D,λ 4 450,335 5,7,3 d,j,c D,C O 6 e 5,6 k,d,f,f E,λ e 5 375,160 6,7,4 e,k,d E,D f 6,7 e,e,k,g E,λ f E 5 6 250,40 7,5 f,e E g 7,1 h,f,a,a A,λ 7 k D 7 225,190 1,2,3, g,h,i, A,B, h 7,2 i,g,b,a B,A j d g 4,5,6 j,k,f C,D, i 7,3 j,h,c,b C,B i A h C E,F j 7,4 k,i,d,c D,C 4 1 B O(#triangoli) anche nel caso a c k 7,5 f,j,e,d E,D b peggiore con le svolte 2 3 4
  • 5. INDICE SPAZIALE • Struttura ausiliaria • Non fa parte della mesh • Suddivide le regioni • Regole di divisione • Ricerca limitata a tot regioni • Ogni regione contiene info • Dominio (estremi) • Vertici all’interno • Triangoli intersecati • Edge intersecati • Rapido accesso all’indice • Strutture di tipo albero 5
  • 6. ALBERO Grafo diretto • Aciclico • Connesso • Senza sotto-alberi condivisi • Una sola radice Elimineremo nodi interni e puntatori 6
  • 7. BINARY SEARCH TREE Ricerca in una dimensione L’elemento 64 è presente nell’albero? Cammino: 60,74,65,63,64! Complessità logaritmica 7
  • 8. POINT REGION QUADTREE Indice per punti nello spazio bidimensionale 8
  • 9. POINT REGION QUADTREE (SITUAZIONE INIZIALE) Ogni punto in una regione/foglia dell’albero Dividiamo le regioni sempre in 4 ricorsivamente 9
  • 10. POINT REGION QUADTREE (INSERIEMENTO DI A E B) A B 10
  • 11. POINT REGION QUADTREE (A E B INSERITI) A B 11
  • 12. POINT REGION QUADTREE (INSERIMENTO DI C E D) A C B D 12
  • 13. POINT REGION QUADTREE (C INSERITO) A C B D 13
  • 14. POINT REGION QUADTREE (C E D INSERITI) A C B D 14
  • 15. POINT REGION QUADTREE (INSERIMENTO DI E) A E C B D 15
  • 16. POINT REGION QUADTREE (INSERIMENTO DI E) A E C B D 16
  • 17. POINT REGION QUADTREE (E INSERITO) A E C B D 17
  • 18. POINT REGION QUADTREE (E INSERITO) C B D 18
  • 19. POINT REGION QUADTREE C B D F K J A E N L M P G H 19
  • 20. PR-QUADTREE (CONSIDERAZIONI) Struttura non dipende dall’ordine di inserimento dell’albero Ogni nodo dell’albero rappresenta una regione nello spazio 2D Ogni nodo dell’albero può contenere solo un punto Spazio diviso sempre in quattro quadranti di ugual dimensione Inserimento ricorsivo finché la foglia vuota non viene trovata/creata Un singolo inserimento può aumentare di molti livello l’albero se i punti sono particolarmente vicini Minore è la distanza tra i punti, maggiore sarà la profondità dell’albero 20
  • 21. POINTER-LESS RAPPRESENTATION Evitiamo di memorizzare: • I puntatori (4 per ogni nodo interno) • Nodi interni Memorizziamo solo i nodi foglia con relativo location code che codifica il cammino all’interno dell’albero per arrivarci Si evita di memorizzare una grande quantità di puntatori e di nodi all’interno dell’albero Diversi metodi per realizzarlo Irene Gargantini, An Effective Way to Rapresent Quadtrees, 1982 21
  • 22. INDICI PER MESH POLIGONALI PM3T-quadtree • Memorizza triangoli • Stessa divisione dei PR-quadtree PM2-quadtree • Memorizza edge • Qualsiasi polygon map non solo triangoli • Divisione regioni più fine PM2T-quadtree • Memorizza triangoli • Divisione regioni più fine 22
  • 23. PM3T QUADTREE Estensione del PR-quadtree per mesh triangolari Divisione spaziale sui vertici identica al PR-quadtree Una foglia può contenere un vertice e la lista dei triangoli intersecati vi: x, y, z 3N t i : v 1, v 2 , v 3 3T ≈ 6N (Eulero) li: loc, v, list* 3LN + 2TL LN è il numero di foglie dell’indice TL è la lunghezza di tutte le liste di triangoli Handle/Manico della lista Ogni nodo della lista contiene l’indice del triangolo e il puntatore al successivo nodo 23
  • 24. CLASSE DEI PM QUADTREE Simili ai PR-quadtree, ma definiti su polygon map • Alberi di ricerca quaternari • Memorizzano i punti all’interno della regione • Memorizzano anche gli spigoli • Il partizionamento definito rispetto ai vertici con regole aggiuntive 24
  • 25. PM2 QUADTREE Estensione del PM-quadtree Divisione spaziale più fine del PR-quadtree (e del PM3T-quadtree) Una foglia può contenere un vertice e la lista degli edge intersecati 1) Una foglia/regione che contiene un vertice può intersecare solo edge che incidono su tale vertice 2) Una foglia/regione che non contiene un vertice può intersecare solo edge che incidono sullo stesso vertice esterno al blocco 25
  • 26. PM2 QUADTREE (COSTO) Funziona per qualsiasi poligono, non solo triangoli A causa delle regole 1 e 2 abbiamo, in generale, più regioni/foglie rispetto ad un PM3T-quadtree e quindi LN sarà maggiore vi: x, y, z 3N ei: v1, v2 2E ≈ 6N (formula di Eulero) li: loc, list* 2LN + 2EL il vertice all’interno di una foglia è facilmente ricavabile (gli edge nella lista hanno tutti un vertice comune) LN è il numero di foglie dell’indice EL è la lunghezza di tutte le liste di edge 26
  • 27. PM2T QUADTREE Estensione del PR-quadtree per mesh triangolari Divisione spaziale più fine del PR-quadtree (e del PM3T-quadtree) Una foglia può contenere un vertice e la lista dei triangoli intersecati 1) Una foglia/regione che contiene un vertice può intersecare solo triangoli che incidono su tale vertice 2) Una foglia/regione che non contiene un vertice può intersecare solo triangoli che incidono sullo stesso vertice esterno al blocco 27
  • 28. PM2T QUADTREE (TIPO FOGLIA) 4 differenti tipi di foglia/regione: Foglia completamente vuota ha tipo -1 Foglia intersecata da almeno 3 triangoli ha come tipo l’indice v del vertice condiviso, triangoli memorizzati non esplicitamente v è un numero intero positivo Foglia intersecata da 1 solo triangolo t ha come tipo l’indice del triangolo come –2(t+1) negativo pari –(tipo/2)–1 Foglia intersecata da 2 triangoli t1 e t2 memorizza l’indice di uno dei triangoli come –2(t1+1)+1 o –2(t2+1)+1 negativo dispari in modo che sia diverso da -1 ((1–tipo)/2)–1 28
  • 29. PM2T QUADTREE (COSTO) A causa delle regole 1 e 2 abbiamo, in generale, più regioni/foglie rispetto ad un PM3T-quadtree e quindi LN sarà maggiore vi: x, y, z, t 4N t i : v1 , v2 , v3, t 1 , t 2 , t 3 6T ≈ 12N (formula di Eulero) (classica struttura indicizzata con adiacenze) li: loc, tipo 2LN (nessuna lista) grazie al tipo e alle relazioni tra vertici e triangoli possiamo navigare la mesh LN è il numero di foglie dell’indice LN ≈ 5N per dati sintetizzati (63% in più rispetto alla struttura classica) LN ≈ 6N per dati reali (75% in più rispetto alla struttura classica) De Floriani, Fancinoli, Magillo, Dimitri; A HIERARCHICAL SPATIAL INDEX FOR TRIANGULATED SURFACES; 2008 29
  • 30. ANALISI: STRUTTURA DELL’ALBERO De Floriani, Fancinoli, Magillo, Dimitri; A HIERARCHICAL SPATIAL INDEX FOR TRIANGULATED SURFACES; 2008 30
  • 31. ANALISI: OCCUPAZIONE Table: Depth of the tree, number of leaf nodes, and storage costs on real data Rome 957’456 vertices 1’914’867 triangles Dolomites 810’000 vertices 1’619’963 triangles De Floriani, Fancinoli, Magillo, Dimitri; A HIERARCHICAL SPATIAL INDEX FOR TRIANGULATED SURFACES; 2008 31
  • 32. ANALISI: PERFORMANCE Point location: trovare il triangolo che contiene un punto Costo: discesa nell’albero per trovare la regione che contiene il punto + test di point-in-triangle per ogni triangolo nella regione Meno svolte (pesanti a causa dell’aritmetica FP) Varianza minore: caso peggiore vicino alla media Più nodi visitati a causa della maggior profondità dell’albero Meno triangoli controllati (Per i PM2-quadtree si ha informazione solo sugli edge quindi il calcolo diventa complesso) De Floriani, Fancinoli, Magillo, Dimitri; A HIERARCHICAL SPATIAL INDEX FOR TRIANGULATED SURFACES; 2008 32