I have a set of x, y co-ordinates that are actually taken from hand drawings of a circle, square or a triangle. Using the set of points, I need to mathematically find if the points approximately fit a square, circle or a triangle. What is the ideal way to implement this case?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Calculate all the slopes between pairs of points, and order them. If there are two numbers that show up repeatedly in your list, you've got a square; three, a triangle; none; a circle.
This assumes that the given points are many in number and sampled randomly from the drawing.