Hacker News new | ask | show | jobs
by fastneutron 1105 days ago
Shewchuk’s Triangle code for Delaunay mesh generation is some of the most elegant C-code I’ve ever seen [1]. It even won the SIAM Wilkinson Prize for numerical software at the time it was written. It’s written in a literate style, and builds up from the most fundamental arithmetic operations and data structures, all the way to one of the most efficient mesh generators of its kind. He has a few other codebases written in a similar style [2, 3]. It’s very different from what you see in the wild, but it’s been great for understanding what’s happening under the hood for complex algorithms like mesh generation.

1. https://www.cs.cmu.edu/~quake/triangle.html

2. https://github.com/ctlee/Stellar

3. https://www.cs.cmu.edu/~quake/robust.html