Given a set of points in a 2D space, there are gazillions of suggestion on how to compute a convex hull. However, in my assignment, we need to add the information about the figure that's going to be produced. In fact, given the somewhat dull nature of the work, we do know that it's going to be a rectangle, triangle or, if things get wild and crazy, a trapezoid.
The convex hull given that it's rectangle is trivial to compute. One only needs to find the extremes of all the points' x and y. However, when it comes to the triangle, I feel a bit confused. It seems that there's a unique convex hull provided that we're supposed to produce a triangle but I can't shake off the feeling that it's actually an ambiguous concept. It gets even less transparent when it comes to the trapezoid.
Is it possible to uniquely determine the convex hull of a set of 2D points given that the resulting figure is a triangle?
And if so, how should I approach the problem?
Is it possible to uniquely determine the convex hull of a set of 2D points given that the resulting figure is a trapezoid?
Is the approach to be similar to triangle case?
There's a suggestion on how to do the triangle part but it has two significant drawbacks. First one being that I don't have access to MatLab (we work with C) and second being that I don't quite follow it, hehe.