Smooth polyline with minimal deformation
问题 I've got a 2D closed polyline, which is reasonably smooth. The vertices that define the polyline however are not spaced equally. Sometimes two will be very close, sometimes as many as four will be very close together. I'd like to smooth the polyline, but a regular averaging algorithm tends to shrink the area: for (int i = 0; i < (V.Length-1); i++) { PointF prev = V[i-1]; //I have code that wraps the index around. PointF next = V[i+1]; PointF pt = V[i]; float ave_x = one_third * (prev.X + next