Kekker_
kekker.bsky.social
Kekker_
@kekker.bsky.social
Game designer

I make demos, which will hopefully be a game at some point
I went with the Graham scan. It's both significantly more efficient (O(nlogn) vs O(n^2) for gift wrap) and makes way more logical sense.

The only implementation problem was Godot refusing to sort the points by angle. It took 9 hours to find out that it works if I pre-compute the angles :) (4/4)
November 25, 2024 at 2:41 AM
You pick two points and you're supposedly meant to check that all points are to the right of a line between them. But I'm making a hull. Some edges will have points to the left *by definition of a hull*. It sounds frankly nonsensical, and it's not even a good algorithm at O(n^2). (3/4)
November 25, 2024 at 2:41 AM
I saw a lot of posts recommending the gift wrap algorithm for generating the convex hull, citing its "simplicity". But that algorithm makes absolutely no sense to me. (2/4)
November 25, 2024 at 2:41 AM