Better poly init. Inverted y-coordintae. Removed auto because of compability issues.
Algorithm improved, missing case handled now