# muskangovind19/icp-kd-tree-benchmark architecture

> Architecture diagram of the GitHub repository muskangovind19/icp-kd-tree-benchmark, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muskangovind19/icp-kd-tree-benchmark
- Repository: https://github.com/muskangovind19/icp-kd-tree-benchmark

## Overview

This is a standalone synthetic 3D point-cloud registration and spatial-indexing benchmark. Its runtime generates a spherical target and transformed source, repeatedly matches points and updates the rigid alignment, compares ANN search with brute force, and saves PLY outputs. The workflow is implemented in one file, so several components share its path. Edges reflect the calls and data flow visible in main.cpp; the README documents how users launch the executable.

Main entry points: [`main.cpp`](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp) (ICP benchmark)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Synthetic Data"]
  node_sphere["Sphere generator<br/>[main.cpp]"]
  node_source_transform["Source transform<br/>[main.cpp]"]
  node_ply["PLY writer<br/>[main.cpp]"]
end

subgraph group_registration["ICP Registration"]
  node_ann_index["ANN k-d tree<br/>[main.cpp]"]
  node_ann_match["ANN matching<br/>[main.cpp]"]
  node_svd_update["SVD alignment<br/>[main.cpp]"]
  node_convergence["Convergence check<br/>[main.cpp]"]
end

subgraph group_benchmark["Benchmark and Output"]
  node_driver["ICP benchmark<br/>[main.cpp]"]
  node_brute_match["Brute-force matching<br/>[main.cpp]"]
  node_timing["Timing and metrics<br/>[main.cpp]"]
end

node_user(("User"))

node_user -->|"runs"| node_driver
node_driver -->|"generates target"| node_sphere
node_driver -->|"transforms target"| node_source_transform
node_driver -->|"saves clouds"| node_ply
node_driver -->|"builds index"| node_ann_index
node_driver -->|"queries matches"| node_ann_match
node_ann_match -->|"searches"| node_ann_index
node_driver -->|"computes comparison"| node_brute_match
node_driver -->|"updates alignment"| node_svd_update
node_driver -->|"checks RMSE"| node_convergence
node_driver -->|"reports durations"| node_timing
node_ann_match -->|"measures search"| node_timing
node_brute_match -->|"measures search"| node_timing

click node_driver "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_sphere "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_source_transform "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_ply "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_ann_index "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_ann_match "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_brute_match "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_svd_update "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_convergence "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"
click node_timing "https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sphere,node_source_transform,node_ply,node_user toneBlue
class node_ann_index,node_ann_match,node_svd_update,node_convergence toneAmber
class node_driver,node_brute_match,node_timing toneMint
```

## Components

### Synthetic Data

- [Sphere generator](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`
- [Source transform](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`
- [PLY writer](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`

### ICP Registration

- [ANN k-d tree](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`
- [ANN matching](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`
- [SVD alignment](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`
- [Convergence check](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`

### Benchmark and Output

- [ICP benchmark](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`
- [Brute-force matching](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`
- [Timing and metrics](https://github.com/muskangovind19/icp-kd-tree-benchmark/blob/main/main.cpp): `main.cpp`

### Other components

- **User**

## Connections

- User → ICP benchmark: runs (evidence: `README.md`)
- ICP benchmark → Sphere generator: generates target (evidence: `main.cpp`)
- ICP benchmark → Source transform: transforms target (evidence: `main.cpp`)
- ICP benchmark → PLY writer: saves clouds (evidence: `main.cpp`)
- ICP benchmark → ANN k-d tree: builds index (evidence: `main.cpp`)
- ICP benchmark → ANN matching: queries matches (evidence: `main.cpp`)
- ANN matching → ANN k-d tree: searches (evidence: `main.cpp`)
- ICP benchmark → Brute-force matching: computes comparison (evidence: `main.cpp`)
- ICP benchmark → SVD alignment: updates alignment (evidence: `main.cpp`)
- ICP benchmark → Convergence check: checks RMSE (evidence: `main.cpp`)
- ICP benchmark → Timing and metrics: reports durations (evidence: `main.cpp`)
- ANN matching → Timing and metrics: measures search (evidence: `main.cpp`)
- Brute-force matching → Timing and metrics: measures search (evidence: `main.cpp`)
