Bug introduced in 11.1 or earlier and persisting through 11.2.0 or later
I use Area
function to evaluate the area of the polygon. I found that when two vertex points are the same, the Area
give the wrong result. For example, I define the following function:
areacoor[x_, y_] := Area@Polygon[{{x, y}, {0.5, 0.5}, {1, 1}}]
which is the area of the triangle whose vertex points is {x, y}, {0.5, 0.5} and {1, 1}. When $(x,y)$ move towards to any two other points, for example, $(x,y)\to (0.5,0.5)$, the area of the triangle will become smaller and smaller. When $(x,y)=(0.5,0.5)$, the triangle will become a line and the area should be 0. However areacoor[0.5,0.5]
gives 0.707107. I wonder why I obtain this result, which I think is not reasonable.
Area
rebust for degenerating polygons, deleted duplicate vertex coordinates and somewhat mixed upArea
andRegionMeasure
... $\endgroup$Area[Polygon[{{0.4
, 0.4}, {0.5
, 0.5}, {1, 1}}]]
, too, misfires. $\endgroup$