Recognition and autocompletion of partially drawn symbols by using polar histograms as spatial relation descriptors