Smooth a graph as if placing a rope across the data…?











up vote
3
down vote

favorite












I'm not sure how to correctly phrase this question, in fact if I knew exactly what I needed to ask I could probably work it out myself, so please bear with me.



What I need to do is smooth out a line, but weight the smoothing so that the smoothed graph never goes below the sampled data. What it would look like is if you put a thick rope over the sample points so that at the pointy bits the smooth curve of the rope would be close to the data, and at the low points of the data the smooth rope would be hanging in space. Like the red line here (it's a bit wrong at the top right, but you get the idea):



enter image description here



This is for some motion graphics I'm doing. The samples are from a timed transcript of someone speaking. As they speak their words appear, and then float off, driven by an expression. If I track the timing of the words exactly it's very jerky, if I take an average of the value over a period of time, e.g. five seconds I get the smoothness I want, but it looks bad when the text lags behind the speaking, but not so much if the speech lags behind the words.










share|cite|improve this question




















  • 1




    +1 for a very interesting problem! I wonder if the convex hull would give you what you want? That would give you a piece-wise linear envelope, and there's probably some way you could get rid of the lower part of it. See en.wikipedia.org/wiki/Convex_hull_algorithms. Also, most numerical libraries would have numerical geometry algorithms in them, including the computation of convex hulls.
    – Adrian Keister
    Nov 28 at 14:07












  • Kinda disappointed that it's an interesting problem. I had hope that the answer would be 'oh that's just <mathematician's name> smoothing'
    – stib
    Nov 28 at 23:53















up vote
3
down vote

favorite












I'm not sure how to correctly phrase this question, in fact if I knew exactly what I needed to ask I could probably work it out myself, so please bear with me.



What I need to do is smooth out a line, but weight the smoothing so that the smoothed graph never goes below the sampled data. What it would look like is if you put a thick rope over the sample points so that at the pointy bits the smooth curve of the rope would be close to the data, and at the low points of the data the smooth rope would be hanging in space. Like the red line here (it's a bit wrong at the top right, but you get the idea):



enter image description here



This is for some motion graphics I'm doing. The samples are from a timed transcript of someone speaking. As they speak their words appear, and then float off, driven by an expression. If I track the timing of the words exactly it's very jerky, if I take an average of the value over a period of time, e.g. five seconds I get the smoothness I want, but it looks bad when the text lags behind the speaking, but not so much if the speech lags behind the words.










share|cite|improve this question




















  • 1




    +1 for a very interesting problem! I wonder if the convex hull would give you what you want? That would give you a piece-wise linear envelope, and there's probably some way you could get rid of the lower part of it. See en.wikipedia.org/wiki/Convex_hull_algorithms. Also, most numerical libraries would have numerical geometry algorithms in them, including the computation of convex hulls.
    – Adrian Keister
    Nov 28 at 14:07












  • Kinda disappointed that it's an interesting problem. I had hope that the answer would be 'oh that's just <mathematician's name> smoothing'
    – stib
    Nov 28 at 23:53













up vote
3
down vote

favorite









up vote
3
down vote

favorite











I'm not sure how to correctly phrase this question, in fact if I knew exactly what I needed to ask I could probably work it out myself, so please bear with me.



What I need to do is smooth out a line, but weight the smoothing so that the smoothed graph never goes below the sampled data. What it would look like is if you put a thick rope over the sample points so that at the pointy bits the smooth curve of the rope would be close to the data, and at the low points of the data the smooth rope would be hanging in space. Like the red line here (it's a bit wrong at the top right, but you get the idea):



enter image description here



This is for some motion graphics I'm doing. The samples are from a timed transcript of someone speaking. As they speak their words appear, and then float off, driven by an expression. If I track the timing of the words exactly it's very jerky, if I take an average of the value over a period of time, e.g. five seconds I get the smoothness I want, but it looks bad when the text lags behind the speaking, but not so much if the speech lags behind the words.










share|cite|improve this question















I'm not sure how to correctly phrase this question, in fact if I knew exactly what I needed to ask I could probably work it out myself, so please bear with me.



What I need to do is smooth out a line, but weight the smoothing so that the smoothed graph never goes below the sampled data. What it would look like is if you put a thick rope over the sample points so that at the pointy bits the smooth curve of the rope would be close to the data, and at the low points of the data the smooth rope would be hanging in space. Like the red line here (it's a bit wrong at the top right, but you get the idea):



enter image description here



This is for some motion graphics I'm doing. The samples are from a timed transcript of someone speaking. As they speak their words appear, and then float off, driven by an expression. If I track the timing of the words exactly it's very jerky, if I take an average of the value over a period of time, e.g. five seconds I get the smoothness I want, but it looks bad when the text lags behind the speaking, but not so much if the speech lags behind the words.







interpolation data-analysis






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 28 at 14:07









Adrian Keister

4,58251933




4,58251933










asked Nov 26 at 2:14









stib

1163




1163








  • 1




    +1 for a very interesting problem! I wonder if the convex hull would give you what you want? That would give you a piece-wise linear envelope, and there's probably some way you could get rid of the lower part of it. See en.wikipedia.org/wiki/Convex_hull_algorithms. Also, most numerical libraries would have numerical geometry algorithms in them, including the computation of convex hulls.
    – Adrian Keister
    Nov 28 at 14:07












  • Kinda disappointed that it's an interesting problem. I had hope that the answer would be 'oh that's just <mathematician's name> smoothing'
    – stib
    Nov 28 at 23:53














  • 1




    +1 for a very interesting problem! I wonder if the convex hull would give you what you want? That would give you a piece-wise linear envelope, and there's probably some way you could get rid of the lower part of it. See en.wikipedia.org/wiki/Convex_hull_algorithms. Also, most numerical libraries would have numerical geometry algorithms in them, including the computation of convex hulls.
    – Adrian Keister
    Nov 28 at 14:07












  • Kinda disappointed that it's an interesting problem. I had hope that the answer would be 'oh that's just <mathematician's name> smoothing'
    – stib
    Nov 28 at 23:53








1




1




+1 for a very interesting problem! I wonder if the convex hull would give you what you want? That would give you a piece-wise linear envelope, and there's probably some way you could get rid of the lower part of it. See en.wikipedia.org/wiki/Convex_hull_algorithms. Also, most numerical libraries would have numerical geometry algorithms in them, including the computation of convex hulls.
– Adrian Keister
Nov 28 at 14:07






+1 for a very interesting problem! I wonder if the convex hull would give you what you want? That would give you a piece-wise linear envelope, and there's probably some way you could get rid of the lower part of it. See en.wikipedia.org/wiki/Convex_hull_algorithms. Also, most numerical libraries would have numerical geometry algorithms in them, including the computation of convex hulls.
– Adrian Keister
Nov 28 at 14:07














Kinda disappointed that it's an interesting problem. I had hope that the answer would be 'oh that's just <mathematician's name> smoothing'
– stib
Nov 28 at 23:53




Kinda disappointed that it's an interesting problem. I had hope that the answer would be 'oh that's just <mathematician's name> smoothing'
– stib
Nov 28 at 23:53










1 Answer
1






active

oldest

votes

















up vote
2
down vote













You're possibly looking for the envelope of the data. There is a Wikipedia article on it. https://en.m.wikipedia.org/wiki/Envelope_(waves)






share|cite|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: "69"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3013723%2fsmooth-a-graph-as-if-placing-a-rope-across-the-data%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    You're possibly looking for the envelope of the data. There is a Wikipedia article on it. https://en.m.wikipedia.org/wiki/Envelope_(waves)






    share|cite|improve this answer



























      up vote
      2
      down vote













      You're possibly looking for the envelope of the data. There is a Wikipedia article on it. https://en.m.wikipedia.org/wiki/Envelope_(waves)






      share|cite|improve this answer

























        up vote
        2
        down vote










        up vote
        2
        down vote









        You're possibly looking for the envelope of the data. There is a Wikipedia article on it. https://en.m.wikipedia.org/wiki/Envelope_(waves)






        share|cite|improve this answer














        You're possibly looking for the envelope of the data. There is a Wikipedia article on it. https://en.m.wikipedia.org/wiki/Envelope_(waves)







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 26 at 2:51

























        answered Nov 26 at 2:18









        Michael Stachowsky

        1,260417




        1,260417






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3013723%2fsmooth-a-graph-as-if-placing-a-rope-across-the-data%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Berounka

            Sphinx de Gizeh

            Different font size/position of beamer's navigation symbols template's content depending on regular/plain...