Project Specification: Geometric Theory Inference Engine

Target Platform: Web / TensorFlow.js Goal: Semantic reconstruction of point clouds via evolutionary constraint discovery.

1. Abstract

Standard mesh reconstruction algorithms (Poisson, Ball-Pivoting) focus on surface topology—connecting dots to form a skin. This project aims for semantic reconstruction. It seeks to discover the underlying “blueprint” or “theory” that generates the point cloud. **Figure 1:** Contrast between standard surface reconstruction (fitting a skin) versus semantic reconstruction (discovering the underlying geometric blueprint).

The system inputs a raw point cloud and outputs a Minimally-Complex Geometric Model. This model consists of a sparse set of Control Points governed by explicit Geometric Constraints (angles, distances, torsion), which reproduce the input cloud through linear combinations.

## 2. The Core Architecture

The model is treated as a structured Autoencoder where the latent space is an explicit geometric graph rather than a black-box vector.

2.1. The Data Flow

**Figure 2:** The system architecture. Unlike traditional autoencoders, the latent bottleneck is an explicit, interpretable geometric graph.

  1. Input ($\mathbf{P}_{obs}$): A point cloud tensor of shape $(N, 3)$.
  2. Latent Variables ($\mathbf{C}$): A set of $M$ Control Points, shape $(M, 3)$, where $M \ll N$.
  3. Projection ($\mathbf{W}$): A weight matrix defining how Control Points combine to form the cloud.
    • $\mathbf{P}_{gen} = \mathbf{W} \times \mathbf{C}$
    • Note: In a “Rigid Body” interpretation, $\mathbf{W}$ represents the barycentric coordinates or attachment weights of the cloud points relative to the control “bones.”
  4. Constraints ($\mathbf{G}$): A graph where nodes are Control Points and edges are geometric rules.

2.2. The Constraint Layers (The “Theory”)

The “Theory” is defined by the energy potential of the constraints. A valid theory has near-zero energy. The system supports the following differentiable constraint layers: **Figure 3:** Visualizing the library of differentiable geometric constraints used to define the "Theory."

  1. 2-Point Distance: $|c_i - c_j| = k$ (Defines rigid struts).
  2. 3-Point Angle: $\text{acos}(\frac{\vec{v}{ij} \cdot \vec{v}{kj}}{|\vec{v}{ij}| |\vec{v}{kj}|}) = \theta$ (Defines corners/hinges).
  3. 3-Point Line-to-Point: Distance from $c_k$ to line $\overline{c_i c_j}$ is $d$ (often $d=0$ for collinearity).
  4. 4-Point Equal-Length: $|c_i - c_j| = |c_k - c_l|$ (Symmetry/Parallelograms).
  5. 4-Point Torsion: The angle between the plane $ijk$ and plane $jkl$ is $\phi$.
  6. 4-Point Plane-to-Point: Distance from $c_l$ to plane defined by $c_i, c_j, c_k$ is $d$ (Coplanarity).

3. Hybrid Optimization Strategy

The system utilizes a Bilevel Optimization approach to solve the discrete combinatorial problem (Graph Topology) and the continuous parameter problem (Geometry) simultaneously. **Figure 4:** The Bilevel Optimization Strategy. The "Architect" (GA) modifies the graph structure, while the "Engineer" (Solver) optimizes the spatial coordinates for that structure.

### 3.1. Outer Loop: Evolutionary Algorithm (The Architect)

3.2. Inner Loop: Differentiable Solver (The Engineer)

4. Addressing Curved Surfaces (Research Vector)

The “Rigid Body” model works perfectly for mechanical parts (planes, beams). Analytically curved surfaces (spheres, cylinders) present a challenge for a sparse point-based theory.

Proposed Solution: Higher-Order Constraints Instead of simulating a circle with 100 control points and distance constraints (a polygon), we introduce Virtual Anchor Points. **Figure 5:** Handling curvature. Instead of using many points to approximate a curve, the system evolves a "Virtual Anchor" (center point) and a radius constraint to define the surface mathematically.

5. Implementation Plan: TensorFlow.js

Using TF.js allows for a “Live Lab” environment where the user can watch the theory evolve in real-time in the browser.

5.1. Technology Stack

5.2. Data Structures (JSON Schema)

A “Theory” can be serialized as:

1
2
3
4
5
6
7
8
9
{
  "controlPoints": 8,
  "constraints": [
    { "type": "distance", "indices": [0, 1], "value": 10.0 },
    { "type": "angle", "indices": [0, 1, 2], "value": 1.5707 },
    { "type": "coplanar", "indices": [0, 1, 2, 3], "value": 0.0 }
  ],
  "weights": "sparse_matrix_indices..."
}

5.3. Development Phases

Phase 1: The Solver (Inner Loop)

Phase 2: The Projector

Phase 3: The Evolution (Outer Loop)

Phase 4: Complexity & Curvature

6. Summary

This system moves beyond fitting data to understanding data. By forcing the reconstruction through a bottleneck of geometric logic, we generate models that are editable, parametric, and human-readable, turning raw scans into CAD-ready definitions.