//////////////////////////////////////////////////////////////////////////////////////// ------------------ Convex Closure Algorithm ------------------- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Hi, this is a convex closure algorithm... yeah scary name, but that's really simple: it just means to find the smallest polygone such that a set of points are contained inside and if you take 2 points and draw a straight line between them the line is inside the polygone. To use this project, just clic where you want to put a point and it will calculate the polygone for you, press [space] to clear the points This is the Graham scan method which is quite simple to understand (here's the wikipedia article: https://en.wikipedia.org/wiki/Graham_scan, note that the french one is a bit more illustrated: https://fr.wikipedia.org/wiki/Parcours_de_Graham) It is quite funny to generate random looking rocks from a set of points (can be funny for a physique simulation or smt) the triangulation of a convex polygone is trivial: just take the first point and draw a triangle with points and one of it's neighbor. This is a O(n) method... No edge cases known (for now...) Everything by me except for the algorithm itself which Ronald Graham made in 1972 and the tri filler by @-Rex- [well... don't mind this] #algorithm #math #set #polygone #point #computer #science