Yes, I ment the graph equation tool.
But the projected distance equation will be very difficult I think.

So a script like you suggested would be great! Thankyou so far.