I'm working on calculating a Geometric Median for an array of points...

Dim p() As New Point ={New Point(1,2), New Point(2,2), New Point(3,4), New Point(5,1), New Point(2,1)}

I've found a formula.. at... https://en.wikipedia.org/wiki/Geometric_median
but, I don't know how to convert that into code. Can anyone explain? Also can you recommend somewhere I can test the working algorithm?