I have a set of points forming a polygon. However, any 3 points in this polygon can also be represented as an arc (starting at point 1, through point 2, to point 3).

Polygon with Arcs

I need to find the area of this polygon (which technically is not a polygon but an area formed by straight or curved lines from point to point).

My idea was, to exclude the arcs (say the middle point of each arc) and calculate the area of the resulting polygon separately and then add the areas of the arcs:

polygon with arc divided into areas

sum = 0
loop through points
  if next three points contain arc middle point
    add arc area to sum
    get rid of middle point of arc and use next point instead

  add area of points to sum

This will work for convex shapes but I don't know how to solve it for concave shapes.

concave polygon with arcs

How would I go about this?

//EDIT: The arcs are always circular arcs (~circle segments). The radius and the angle of the segment is known (it can be calculated from the 3 points).

  • $\begingroup$ What are you given? What do you know? $\endgroup$ – Allawonder Jan 11 at 12:14
  • $\begingroup$ I have the points and I know which points form an arc $\endgroup$ – Fuzzyma Jan 11 at 12:16
  • $\begingroup$ Is the third point defining each arc midway between the endpoints of the arc? $\endgroup$ – Allawonder Jan 11 at 12:24
  • $\begingroup$ No, 3 points form one arc. The second (middle) point is somewhere on the arc $\endgroup$ – Fuzzyma Jan 11 at 12:26

Hint: Find a parametrization of the boundary and use Green's theorem.


Can't you dissect it into convex pieces as indicated below?


In response to the OP's comment, if you had an inward bulge, you could connect the two extreme points, and compute the area of a convex shape minus the area of another convex shape.

If you are trying to write a computer program to do this, you must first specify exactly what kinds of shapes you will be dealing with, and how they will be presented. For example, if the shapes are presented as a list of points in counterclockwise order, with line segments or circular arcs joining them, then lhf's suggestion of Green's theorem seems hard to beat. It's not at all clear to me how a "curved line" will be presented to the program, nor what kinds of curves you want to be prepared to deal with.

I definitely would want to break the area up into regions bounded by simple closed curves, that is, curves that do not intersect themselves. In your second diagram, I'd want to break the area into two pieces, which would require first finding the point where the boundary curve crosses itself.

I don't really know much about this. I answered because I thought you were asking a simpler question. I've added the computational-geometry tag in hopes of attracting an expert.

enter image description here

  • $\begingroup$ But what happens if the arc goes inwards instead of forming a bulge like in this example? $\endgroup$ – Fuzzyma Jan 11 at 12:19
  • $\begingroup$ @Fuzzyma I'll add some more details. Give me a few minutes. $\endgroup$ – saulspatz Jan 11 at 12:26
  • $\begingroup$ thanks! I edited my question with more images to show my problem better $\endgroup$ – Fuzzyma Jan 11 at 12:27
  • $\begingroup$ Thanks for your edit. Yes, this will be a computer program eventually and I hoped that a solution to this problem already exists. Breaking the area into parts by itself is a difficult task, though but I see how it could work $\endgroup$ – Fuzzyma Jan 11 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.