Generalized winding numbers provide a robust measure of point insidedness for 3D surfaces - whether open, self-intersecting, or non-manifold - and are central to numerous geometry processing tasks. However, existing methods trade off between accuracy and computational efficiency, limiting their use in interactive and large-scale applications. We introduce a new formulation and algorithm for computing generalized winding numbers that is both fast and accurate to arbitrary precision, applicable to meshes and parametric surfaces. Our approach expresses the winding number as the sum of two intuitive geometric quantities: the signed number of ray-surface intersections and a boundary integral over the surface's projection onto the unit sphere. This insight leads to an efficient discretization that avoids expensive surface integrals and spherical arrangements. For meshes, our method achieves average speedups of $22\times$ on a CPU compared to the fastest precise methods and $3\times$ compared to the fastest approximation method, while maintaining full precision. On a GPU, for moderately complex meshes we reach a throughput of $10^9$ queries per second, or $4K$ generalized winding number slices at 120 FPS ($13\times$ faster than a naive GPU method). For parametric surfaces, our method is on average $5.6\times$ faster than the state-of-the-art method, with the same precision. Our method naturally handles complex topologies and non-manifold inputs. We extensively validate its accuracy, robustness, and time performance. Our code is available at https://github.com/MartensCedric/antipodal.
翻译:暂无翻译