polygons = Join @@ MeshCells[mesh, 2, "Multicells" -> True][[All, 1]];
polygondata = With[{x = MeshCoordinates[mesh]}, Map[
p \[Function] Partition[x[[p]], 2, 1, 1],
polygons
]];
areas = 0.5 Total[Map[Det, polygondata, {2}], {2}];
circumferences = Total[Map[Norm, Differences /@ polygondata, {2}], {2}];
For the tooltipping, you can also use the option MeshCellLabel
of MeshRegion
, but that's are a bit unwieldy:
MeshRegion[mesh, MeshCellLabel -> Map[
i \[Function] ({2, i} -> Tooltip[iTooltip[
i,
Grid[{
{"vertices""Vertices", polygons[[i]]},
{"area""Vertex Coordinates", polygondata[[i, All, 1]]},
{"Area", areas[[i]]},
{"circumference""Perimeter", circumferences[[i]]}
},
Alignment -> {Left, Top}
]
]
),
Range[MeshCellCount[mesh, 2]]
]
]