Open khanghugo opened 3 hours ago
At the moment, polygon clipping algorithm is copied straight from ChatGPT (with tons of modification of course) but it doesn't quite work
7dd6c569afa0aaaa77f3615584be3bd0978976be
That is why there is this line
Convex hull clipping algorithm looks like it works but the current problem is that the new face from result of clipping does not have sorted vertices. In the original algorithm generated by ChatGPT, it does not even account for that face (in another word, the algorithm is bogus along with explanation).
Works for most cases but the algorithm is pretty messy since it is very original.
Convex hull clipping algorithm is fine. Polygon clipping is not. If anything, convex hull clipping algorithm should be based on that polygon clipping. Right now, they are both different and independent.