Find an envelope of the list of points

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I have a list of points as you can see in the image below. From this list of points, I want to generate a filtered list of points, which is the envelope. Additionally, calculate the area under the envelope.
enter image description here



rawData = 1.`, 1.`, 0.6666666666666666`, 
0.9316770186335404`, 0.5`, 0.906832298136646`, 0.5`,
0.8757763975155279`, 0.5`, 0.8633540372670807`, 0.5`,
0.8509316770186336`, 0.5`, 0.7888198757763976`, 0.5`,
0.7142857142857143`, 0.5`, 0.6645962732919255`, 0.5`,
0.577639751552795`, 0.3333333333333333`,
0.5341614906832298`, 0.3333333333333333`,
0.453416149068323`, 0.16666666666666666`,
0.36024844720496896`, 0.16666666666666666`,
0.2670807453416149`, 0.`, 0.21739130434782608`, 0.`,
0.18633540372670807`, 0.`, 0.13664596273291926`, 0.`,
0.09937888198757763`, 0.`, 0.062111801242236024`, 0.`,
0.055900621118012424`, 0.`, 0.`;

points=1.`,1.`,0.6666666666666666`,0.9316770186335404`,0.5`,0.906832298136646`,0.3333333333333333`,0.5341614906832298`,0.16666666666666666`,0.36024844720496896`,0.`,0.21739130434782608`;

Show[ListPlot[rawData, PlotStyle -> Red], ListLinePlot[points]]
f = Interpolation[points, InterpolationOrder -> 1];
NIntegrate[f[t], t, 0, 1, Method -> "GlobalAdaptive"]









share|improve this question

























    up vote
    2
    down vote

    favorite












    I have a list of points as you can see in the image below. From this list of points, I want to generate a filtered list of points, which is the envelope. Additionally, calculate the area under the envelope.
    enter image description here



    rawData = 1.`, 1.`, 0.6666666666666666`, 
    0.9316770186335404`, 0.5`, 0.906832298136646`, 0.5`,
    0.8757763975155279`, 0.5`, 0.8633540372670807`, 0.5`,
    0.8509316770186336`, 0.5`, 0.7888198757763976`, 0.5`,
    0.7142857142857143`, 0.5`, 0.6645962732919255`, 0.5`,
    0.577639751552795`, 0.3333333333333333`,
    0.5341614906832298`, 0.3333333333333333`,
    0.453416149068323`, 0.16666666666666666`,
    0.36024844720496896`, 0.16666666666666666`,
    0.2670807453416149`, 0.`, 0.21739130434782608`, 0.`,
    0.18633540372670807`, 0.`, 0.13664596273291926`, 0.`,
    0.09937888198757763`, 0.`, 0.062111801242236024`, 0.`,
    0.055900621118012424`, 0.`, 0.`;

    points=1.`,1.`,0.6666666666666666`,0.9316770186335404`,0.5`,0.906832298136646`,0.3333333333333333`,0.5341614906832298`,0.16666666666666666`,0.36024844720496896`,0.`,0.21739130434782608`;

    Show[ListPlot[rawData, PlotStyle -> Red], ListLinePlot[points]]
    f = Interpolation[points, InterpolationOrder -> 1];
    NIntegrate[f[t], t, 0, 1, Method -> "GlobalAdaptive"]









    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I have a list of points as you can see in the image below. From this list of points, I want to generate a filtered list of points, which is the envelope. Additionally, calculate the area under the envelope.
      enter image description here



      rawData = 1.`, 1.`, 0.6666666666666666`, 
      0.9316770186335404`, 0.5`, 0.906832298136646`, 0.5`,
      0.8757763975155279`, 0.5`, 0.8633540372670807`, 0.5`,
      0.8509316770186336`, 0.5`, 0.7888198757763976`, 0.5`,
      0.7142857142857143`, 0.5`, 0.6645962732919255`, 0.5`,
      0.577639751552795`, 0.3333333333333333`,
      0.5341614906832298`, 0.3333333333333333`,
      0.453416149068323`, 0.16666666666666666`,
      0.36024844720496896`, 0.16666666666666666`,
      0.2670807453416149`, 0.`, 0.21739130434782608`, 0.`,
      0.18633540372670807`, 0.`, 0.13664596273291926`, 0.`,
      0.09937888198757763`, 0.`, 0.062111801242236024`, 0.`,
      0.055900621118012424`, 0.`, 0.`;

      points=1.`,1.`,0.6666666666666666`,0.9316770186335404`,0.5`,0.906832298136646`,0.3333333333333333`,0.5341614906832298`,0.16666666666666666`,0.36024844720496896`,0.`,0.21739130434782608`;

      Show[ListPlot[rawData, PlotStyle -> Red], ListLinePlot[points]]
      f = Interpolation[points, InterpolationOrder -> 1];
      NIntegrate[f[t], t, 0, 1, Method -> "GlobalAdaptive"]









      share|improve this question













      I have a list of points as you can see in the image below. From this list of points, I want to generate a filtered list of points, which is the envelope. Additionally, calculate the area under the envelope.
      enter image description here



      rawData = 1.`, 1.`, 0.6666666666666666`, 
      0.9316770186335404`, 0.5`, 0.906832298136646`, 0.5`,
      0.8757763975155279`, 0.5`, 0.8633540372670807`, 0.5`,
      0.8509316770186336`, 0.5`, 0.7888198757763976`, 0.5`,
      0.7142857142857143`, 0.5`, 0.6645962732919255`, 0.5`,
      0.577639751552795`, 0.3333333333333333`,
      0.5341614906832298`, 0.3333333333333333`,
      0.453416149068323`, 0.16666666666666666`,
      0.36024844720496896`, 0.16666666666666666`,
      0.2670807453416149`, 0.`, 0.21739130434782608`, 0.`,
      0.18633540372670807`, 0.`, 0.13664596273291926`, 0.`,
      0.09937888198757763`, 0.`, 0.062111801242236024`, 0.`,
      0.055900621118012424`, 0.`, 0.`;

      points=1.`,1.`,0.6666666666666666`,0.9316770186335404`,0.5`,0.906832298136646`,0.3333333333333333`,0.5341614906832298`,0.16666666666666666`,0.36024844720496896`,0.`,0.21739130434782608`;

      Show[ListPlot[rawData, PlotStyle -> Red], ListLinePlot[points]]
      f = Interpolation[points, InterpolationOrder -> 1];
      NIntegrate[f[t], t, 0, 1, Method -> "GlobalAdaptive"]






      list-manipulation numerical-integration






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      Kiril Danilchenko

      625315




      625315




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          2
          down vote













          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]


          enter image description here






          share|improve this answer






















          • You should use InterpolationOrder -> 1; otherwise the integral will be wrong.
            – Henrik Schumacher
            15 mins ago










          • Thank you @Henrik.
            – kglr
            14 mins ago

















          up vote
          1
          down vote













          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];


          enter image description here



          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]]]]


          enter image description here






          share|improve this answer






















          • thank you for the answer. How I get the boundary points from the ConvexHull
            – Kiril Danilchenko
            1 hour ago










          • The problem with this is that by design, it will miss dips or troughs in the data.
            – J. M. is computer-less♦
            1 hour ago











          • It all comes down to what the poser means by "envelope." I assumed the Convex Hull.
            – David G. Stork
            59 mins ago






          • 1




            A bit hard to explain since I am on mobile, but I will try. Look at kglr's answer. In particular, notice the green line in his answer. A convex hull approach will not be able to reproduce that.
            – J. M. is computer-less♦
            59 mins ago

















          up vote
          1
          down vote













          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]
          ]


          enter image description here



          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







          share|improve this answer




















            Your Answer




            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "387"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f183933%2ffind-an-envelope-of-the-list-of-points%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            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]


            enter image description here






            share|improve this answer






















            • You should use InterpolationOrder -> 1; otherwise the integral will be wrong.
              – Henrik Schumacher
              15 mins ago










            • Thank you @Henrik.
              – kglr
              14 mins ago














            up vote
            2
            down vote













            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]


            enter image description here






            share|improve this answer






















            • You should use InterpolationOrder -> 1; otherwise the integral will be wrong.
              – Henrik Schumacher
              15 mins ago










            • Thank you @Henrik.
              – kglr
              14 mins ago












            up vote
            2
            down vote










            up vote
            2
            down vote









            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]


            enter image description here






            share|improve this answer














            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]


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 24 secs ago

























            answered 1 hour ago









            kglr

            165k8188388




            165k8188388











            • You should use InterpolationOrder -> 1; otherwise the integral will be wrong.
              – Henrik Schumacher
              15 mins ago










            • Thank you @Henrik.
              – kglr
              14 mins ago
















            • You should use InterpolationOrder -> 1; otherwise the integral will be wrong.
              – Henrik Schumacher
              15 mins ago










            • Thank you @Henrik.
              – kglr
              14 mins ago















            You should use InterpolationOrder -> 1; otherwise the integral will be wrong.
            – Henrik Schumacher
            15 mins ago




            You should use InterpolationOrder -> 1; otherwise the integral will be wrong.
            – Henrik Schumacher
            15 mins ago












            Thank you @Henrik.
            – kglr
            14 mins ago




            Thank you @Henrik.
            – kglr
            14 mins ago










            up vote
            1
            down vote













            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];


            enter image description here



            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]]]]


            enter image description here






            share|improve this answer






















            • thank you for the answer. How I get the boundary points from the ConvexHull
              – Kiril Danilchenko
              1 hour ago










            • The problem with this is that by design, it will miss dips or troughs in the data.
              – J. M. is computer-less♦
              1 hour ago











            • It all comes down to what the poser means by "envelope." I assumed the Convex Hull.
              – David G. Stork
              59 mins ago






            • 1




              A bit hard to explain since I am on mobile, but I will try. Look at kglr's answer. In particular, notice the green line in his answer. A convex hull approach will not be able to reproduce that.
              – J. M. is computer-less♦
              59 mins ago














            up vote
            1
            down vote













            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];


            enter image description here



            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]]]]


            enter image description here






            share|improve this answer






















            • thank you for the answer. How I get the boundary points from the ConvexHull
              – Kiril Danilchenko
              1 hour ago










            • The problem with this is that by design, it will miss dips or troughs in the data.
              – J. M. is computer-less♦
              1 hour ago











            • It all comes down to what the poser means by "envelope." I assumed the Convex Hull.
              – David G. Stork
              59 mins ago






            • 1




              A bit hard to explain since I am on mobile, but I will try. Look at kglr's answer. In particular, notice the green line in his answer. A convex hull approach will not be able to reproduce that.
              – J. M. is computer-less♦
              59 mins ago












            up vote
            1
            down vote










            up vote
            1
            down vote









            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];


            enter image description here



            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]]]]


            enter image description here






            share|improve this answer














            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];


            enter image description here



            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]]]]


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 56 mins ago

























            answered 1 hour ago









            David G. Stork

            21.8k11747




            21.8k11747











            • thank you for the answer. How I get the boundary points from the ConvexHull
              – Kiril Danilchenko
              1 hour ago










            • The problem with this is that by design, it will miss dips or troughs in the data.
              – J. M. is computer-less♦
              1 hour ago











            • It all comes down to what the poser means by "envelope." I assumed the Convex Hull.
              – David G. Stork
              59 mins ago






            • 1




              A bit hard to explain since I am on mobile, but I will try. Look at kglr's answer. In particular, notice the green line in his answer. A convex hull approach will not be able to reproduce that.
              – J. M. is computer-less♦
              59 mins ago
















            • thank you for the answer. How I get the boundary points from the ConvexHull
              – Kiril Danilchenko
              1 hour ago










            • The problem with this is that by design, it will miss dips or troughs in the data.
              – J. M. is computer-less♦
              1 hour ago











            • It all comes down to what the poser means by "envelope." I assumed the Convex Hull.
              – David G. Stork
              59 mins ago






            • 1




              A bit hard to explain since I am on mobile, but I will try. Look at kglr's answer. In particular, notice the green line in his answer. A convex hull approach will not be able to reproduce that.
              – J. M. is computer-less♦
              59 mins ago















            thank you for the answer. How I get the boundary points from the ConvexHull
            – Kiril Danilchenko
            1 hour ago




            thank you for the answer. How I get the boundary points from the ConvexHull
            – Kiril Danilchenko
            1 hour ago












            The problem with this is that by design, it will miss dips or troughs in the data.
            – J. M. is computer-less♦
            1 hour ago





            The problem with this is that by design, it will miss dips or troughs in the data.
            – J. M. is computer-less♦
            1 hour ago













            It all comes down to what the poser means by "envelope." I assumed the Convex Hull.
            – David G. Stork
            59 mins ago




            It all comes down to what the poser means by "envelope." I assumed the Convex Hull.
            – David G. Stork
            59 mins ago




            1




            1




            A bit hard to explain since I am on mobile, but I will try. Look at kglr's answer. In particular, notice the green line in his answer. A convex hull approach will not be able to reproduce that.
            – J. M. is computer-less♦
            59 mins ago




            A bit hard to explain since I am on mobile, but I will try. Look at kglr's answer. In particular, notice the green line in his answer. A convex hull approach will not be able to reproduce that.
            – J. M. is computer-less♦
            59 mins ago










            up vote
            1
            down vote













            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]
            ]


            enter image description here



            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







            share|improve this answer
























              up vote
              1
              down vote













              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]
              ]


              enter image description here



              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







              share|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                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]
                ]


                enter image description here



                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







                share|improve this answer












                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]
                ]


                enter image description here



                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








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 16 mins ago









                Henrik Schumacher

                41.9k260125




                41.9k260125



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f183933%2ffind-an-envelope-of-the-list-of-points%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?