krishauser / Klampt

Kris' Locomotion and Manipulation Planning Toolkit
BSD 3-Clause "New" or "Revised" License
378 stars 96 forks source link

Vectorized Colorize normal and centroid calculations for triangle meshes for speedup #89

Closed joaomcm closed 3 years ago

joaomcm commented 3 years ago

Achieved a 5x speedup by vectorizing how colorize.py calculated triangle normals and centroids using numpy when colorizing faces. Did not immediately find a vectorized version of this calculation for colorizing the vertices, though I'm sure one exists - should I figure it out, will submit another pull request, since the speedup is significant - specially for larger meshes.