converts strokes to vectors (e.g. angles). for example, 272, 93, 42, 179 Now compare these angles with a table of saved angles for recognition:
eg. forms: {{0,90,180,270}, {270, 90, 45, 180}}
for each entry in the table, do the following: for each corner, do the following, take the absolute difference between the two angles and add their total number to save the current total amount
the lower end goal is the form that most resembles.
beware of finding the difference between the two corners. There is a workaround. angle: 359 and 1 are very close to each other ... but if you just subtract them, they look at a distance of 358 degrees.
I hope it was clear
Toad source share