Does anyone have a good reference/suggestions for how to find the point on lineseg ab closest to some query point p, for non-euclidian distance metrics? (Specifically I'd like to know L1 norm and max norm).
(Let me know if this is trivial, I just can't find anything about distance-to-segment queries that isn't L2-norm. tbh I don't super-understand the concept of distance metrics well enough to intuit anything.)
For reference, here's the normal Euclidian-distance aka L2-norm version of what I'm after (a closest-point-on-lineseg query), from: https://iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm )
vec2 …