Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sideeffects/windingnumber
Code for fast approximate generalized winding number (solid angle) computation for triangle soups
https://github.com/sideeffects/windingnumber
Last synced: 3 days ago
JSON representation
Code for fast approximate generalized winding number (solid angle) computation for triangle soups
- Host: GitHub
- URL: https://github.com/sideeffects/windingnumber
- Owner: sideeffects
- License: mit
- Created: 2018-07-13T20:17:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-28T15:55:36.000Z (over 3 years ago)
- Last Synced: 2024-03-26T09:12:41.388Z (9 months ago)
- Language: C++
- Size: 116 KB
- Stars: 126
- Watchers: 20
- Forks: 26
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fast Winding Numbers for Soups
Implementation of the _ACM SIGGRAPH_ 2018 paper,
"Fast Winding Numbers for Soups and Clouds"
Gavin Barill¹, Neil Dickson², Ryan Schmidt³, David I.W. Levin¹, Alec Jacobson¹
¹University of Toronto, ²SideFX, ³Gradient Space
_Note: this implementation is for triangle soups only, not point clouds._
This code, as written, depends on Intel's Threading Building Blocks (TBB) library for parallelism, but it should be fairly easy to change it to use any other means of threading, since it only uses parallel for loops with simple partitioning.
The main class of interest is UT_SolidAngle and its init and computeSolidAngle functions, which you can use by including UT_SolidAngle.h, and whose implementation is mostly in UT_SolidAngle.cpp, using a 4-way bounding volume hierarchy (BVH) implemented in the UT_BVH.h and UT_BVHImpl.h headers. The rest of the files are mostly various supporting code. UT_SubtendedAngle, for computing angles subtended by 2D curves, can also be found in UT_SolidAngle.h and UT_SolidAngle.cpp .
An example of very similar code and how to use it to create a geometry operator (SOP) in Houdini can be found in the HDK examples (toolkit/samples/SOP/SOP_WindingNumber) for Houdini 16.5.121 and later. Query points go in the first input and the mesh geometry goes in the second input.