Right now it uses a big recursive function which can stack overflow in certain cases. Ideally it'd be switched to a "worklist" style algorithm (the normal way to convert a recursive function into a loop) and also have some limits put in place to reject unrealistic results (such as a centroid taking up half the screen)
Right now it uses a big recursive function which can stack overflow in certain cases. Ideally it'd be switched to a "worklist" style algorithm (the normal way to convert a recursive function into a loop) and also have some limits put in place to reject unrealistic results (such as a centroid taking up half the screen)