|
|
|
|
|
Find a starting edge AB by using the 2D algorithm on the projection of the points
on the XY plane.
|
|
|
We can find C where all points lie to the left of triangle ABC by scanning
through all the points. The view to the left is looking along AB so that
the triangle appears as a line.
|
|
|
Similarly, we can find D where all points lie to the left of ACD. The
view to the left is looking along AC so that the triangle appears as a
line. We also need to find the other triangle adjacent to BA and CB,
So we need a stack or a queue to organise the search. Can repeat this
to find the next point and so on.
|