Closed bvssvni closed 10 years ago
The procedural algorithm that generates the points needs to be able to traverse in two directions (think double-linked list). This class of algorithms includes any algorithm that can randomly access points (think arrays).
The bidirectional streaming algorithm requires two closures instead of one.
This algorithm would support spirals.
Suggestion: Find the smallest angle in each triangle and pick the triangle with the largest smallest angle.
One weakness with the algorithm is that you need to start at the tip, or else it will not work.
This is an issue for Rust-Graphics-Lab.
Closing for now.
It is impossible to have general polygon triangulated correctly under streaming. This is because once you send a triangle to the GPU you don't know whether another edge will intersects it later in the stream.
There is a condition where you have a concave polygon but still guarantee that no later triangle will intersect. I call this the "tail tip case": Imagine the tip of a tail or rope where the shape has concave attributes on one side, because the tail is bent.
If we start at the tip and stream points in both directions, we could compute a skewness factor or the candidate triangles we would have by selecting either next point. We pick the triangle with least skewness and use the line between the last picked points in both directions as the base line for the next triangle. Keep doing this until we get the same point from both directions.