# Ramer-Peucker-Douglas algorithm in polar coordinates

I am given a set of values which are distances from a point for a set of fixed angular sectors. For example, I have a distance to center every ten degrees. It forms a regular star (in angle) with varying arm lengths. Just like a radar graph.

Assignment is to create a simplified contour around the circle along the points at the end of each distances, given a precision parameter. I know I could simply express all those points in cartesian coordinates and apply Ramer-Peucker-Douglas. But how can I translate that to polar to make the algorithm less complex ?

Here an example of a radar graph: It is equivalent to the set of distances to center that I am given for fixed angular sectors. In this example, all points are used. My assignment is to algorithmically remove some points while keeping th overall aspect of the graph, using a parameter Epsilon telling me, for example, how far a point not used may be from the line.

Thanks in advance, Charles

• A picture or example would help here. – K. Miller Apr 6 '17 at 13:57
• Done. I hope it's clearer now. I am currently looking at the equations of a straight line in polar coordinates, and seeing how the radius is supposed to evolve as I algorithmically go through each angular sector. Not bringing much now. – Charles Apr 7 '17 at 8:15
• According to the Douglas-Ramer-Peucker algorithm the only place where the particular representation of the points (i.e. polar or Cartesian) comes into play is in the function that computes the distance from the line segment to a point. So it would seem that you have two options. You can either transform the points in polar coordinates to Cartesian, use the standard algorithm, and then transform back, or, modify the distance function to accept points in polar form. In the distance function you could transform to Cartesian coordinates and use standard formulas for the distance. – K. Miller Apr 7 '17 at 13:11