Ramer-Peucker-Douglas algorithm in polar coordinates

133 Views Asked by At

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:

enter image description here

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