Find an envelope of the list of points
{l, u} = Transpose[Through[{First, Last}@#] & /@ GatherBy[SortBy[rawData, Last], First]];
{f1, f2} = Interpolation[#, InterpolationOrder -> 1]& /@ {l, u}
NIntegrate[f2[t] - f1[t], {t, 0, 1}, Method -> "GlobalAdaptive"]
0.101967
Alternatively,
RegionMeasure@BoundaryDiscretizeGraphics[Polygon[Join[Reverse@l, u]]]
0.101967
ListPlot[{rawData, l, u}, Joined -> {False, True, True},
PlotStyle -> {Blue, Red, Green}, Filling -> {2 -> {3}}]
Here another way, using the three-argument version of GroupBy
:
a = KeySort[GroupBy[rawData, First -> Last, MinMax]];
lower = Values[a][[All, 1]];
upper = Values[a][[All, 2]];
t = Keys[a];
Show[
ListLinePlot[{Transpose[{t, upper}], Transpose[{t, lower}]}],
ListPlot[rawData, PlotStyle -> Red]
]
And since these functions are piecewise-linear, we can apply Tai's method directly to obtain the integral exactly:
ω = 0.5 (Join[#, {0.}] + Join[{0.}, #]) &@Differences[t];
(upper - lower).ω
0.101967
If you assume "envelope" means the "shrink wrap" of the points, the answer is:
ConvexHullMesh[rawData]
If you want to get the area under the curve, add a point at {1,0}.
myRegion = ConvexHullMesh[rawData];
Get the area:
RegionMeasure[myRegion]
(* 0.757764 *)
Get the coordinates:
MeshCoordinates[myRegion]
(*
{{1., 1.}, {0.5, 0.906832}, {0., 0.217391}, {0., 0.186335},
{0., 0.136646}, {0., 0.0993789}, {0., 0.0621118}, {0., 0.0559006},
{0., 0.}, {1., 0.}}
*)
Show[HighlightMesh[myRegion, Style[2, Opacity[0.5]]],
Graphics[{PointSize[0.02], Red, Point[MeshCoordinates[myRegion]]}]]