There still isn't but prompted by a question I decided to implement it in an ugly way; after all, if it works that is all that matters :-). All the necessary code to implement different distance metrics is already in node_texture.h
but for some reason it was commented out. I therefore lifted the necessary part from this file and combined it with a a small shader that lets you choose the distance metric with an integer. An example for the Manhattan metric is shown below.
Node setup and code availability
The node setup used to generate the image above looks like this:The code for the shader is available on GitHub. The node it generates may look a bit different than in the noodle shown here because I added an exponent input
E
that can be used for the generalized Minkovsky metric (metric == 6). If you would like to know more about programming OSL you might be interested in my book "Open Shading Language for Blender". More on the availability of this book and a sample can be found on this page.