I've googled a lot, but all algorithms I found used equations for finding control points. I've thought there is simpler solution to do it and found some implementation in ExtJS source code: http://docs-devel.sencha.com/extjs/4.1.2/source/Draw.html#Ext-draw-Draw-method-getAnchors. It uses angles betweeen nearest points of line to detect control points and some hacks.
Can somebody define what kind of algorithm for searching control points is this? I am stuck in manipultation with PI and angles. May be there is more detailed and cleaner explanation, or common idea for this way of solving the problem?