Consider two closed curves without hole
curve 1:
x=c(0.01813766,0.021240708, 0.006101686, -0.01813648, -0.021246640,-0.006100095,0.01813766)
y=c(-0.01795111,0.002401427, 0.027535572, 0.01795129, -0.002396452, -0.027526064,-0.01795111)
curve 2
x=c(0.006476347, 0.027730840, 0.01291382, -0.006475285, -0.027740463,-0.01291557,0.006476347)
y=c(-0.023862392, -0.008557378, 0.01629330, 0.023863672, 0.008560437, -0.01628554, -0.023862392)
Here is the plot:
Want to compute the area of the non-overlapping area.
Note that: In our case if we rotate the red ploygon (for example) the area of the non-overlapping area will change unlike in the case where one consider the the difference between area of the two ploygon as symmetric difference.
Question: I am looking for any package/ code in R which can be used to compute the area of the non-overlapping area between the above two polygon and this non overlapping area is sensible to the rotation of any one polygon.
Any helps. Thanks in advance.