flatpoints is a Python tool for turning a 3D point cloud sampled from a surface into a regular 2D image-like layout. It assigns each point a pixel on a square grid, arranging nearby surface points next to one another so the resulting coordinate and attribute images are spatially coherent. This lets users apply image-processing techniques - including convolutions, interpolation, and matrix decompositions - to point-cloud data such as coordinates, normals, colors, or learned features. The approach adapts geometry images, traditionally used to remap meshes, directly to point clouds, with an optional mesh input.
Because a surface may not fit onto one square without cuts, the method can split closed shapes into two hemispheres or map open surfaces, such as terrain, to one image; users can also choose the viewing axis. The package demonstrates two practical uses. For resampling, it maps the square back onto the surface through bilinear interpolation, using blue-noise sampling or optional optimal-transport refinement to distribute new points. Its documentation notes that this is mainly a demonstration of transferring sampling patterns, since farthest-point sampling performs comparably when selecting a subset of existing points. For compression, it exploits the smooth coordinate images with truncated SVD, 2D DCT, or wavelets, then reconstructs points in their original order. It includes example datasets, plotting tools, and optional visualization and compression dependencies.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.