Thanks for all the great replies! Also wanted to add that there is a plug-in and C++ code available here: