I have a x, y coordinates set, that build up a English alphabetical letter/Shape like as in the image. They are not in straight lines because coordinates are captured when a user write them.
I want to find out through a Java application using the coordinates
- How many straight lines are there
- How many lines are horizontal
- How many lines are vertical
- How many lines are diagonal
For example, for the following image we can see there are approximately 4 straight lines where one is vertical and three is horizontal.
How could I do this? Is there a term/name for this kind of problem?