Electrostatic field-based detection of corners of planar curves