fixed 2d polyp drawing problem and edge finding logic