Hi, I have a drone simulation in which I can set points to be used as anchors for the drone to reach, I want the drone to go from Point A (the first point from the points the user has created) to finding the point that is the longest distance from Point A and assigning it as Point B, here is a visual to help understand:
Currently this is what I have written in C#:
I assumed that the origin point(0, 0, 0) is in the quad angle from 4 points and calculated angle of 4 points with x-axis, which if the points are in a square, will make the drone go from point A to B:
But when the points are not in a square, it will still go across even though the point is not the longest distance:
I was wondering if there is a solution to this ideally in C# but Grasshopper will work as I can understand the method and translate it.
Thank you