It might be a simple question but I am looking for optimal solution. I will have numbers printed on a screen and I will be aware of coordinates. Numbers/Symbols will have 4 points(Square) to define their boundaries. Coordinates of that particular symbol will be stored in a file. Lets' say there is a number 5 and it's 4 coordinates on screens are:(2,20,20,20,2,40,20,40)
Now lets assume that a string 555 represent a value in a file, say the value is Car1
When the user press num pad of 5 thrice then it should detect that he needs Car1.
I am interested to know whether there's some standard formula/Algo to find the range between these 4 coordinates or I have to work on my own. The Formula that was coming in my mind is:
Symbol = (X1+X2+X3+X4)(Y1+Y2+Y3+Y4) = (62)(120) = 182(Representing 5)
But I am skeptical whether it's right and whether the formula will always be given a unique value per symbol/character based on given coordinates?