Posts

Showing posts from October, 2017

Calculating Normalized Vertex Normals of a Triangulated Mesh

The example below demonstrates the code for calculating the averaged per vertex normals of a triangulated mesh. Since pure python is quite slow, numba is used to speed up the calculation. In the given example script, the calculation with native python and the numbafied version took 5.27 sec and 0.32 sec, respectively. The speed increase with numba was about x16.5. Here is the python code: