Distance of a point from the closest surface

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











up vote
3
down vote

favorite












Consider the situation in which I have a cuboid:



Cuboid[0,0,0,1,1,1]


and a point in the cubiod



0.9,0.4,0.6


How do I find the distance from the closest surface of the cuboid?










share|improve this question

























    up vote
    3
    down vote

    favorite












    Consider the situation in which I have a cuboid:



    Cuboid[0,0,0,1,1,1]


    and a point in the cubiod



    0.9,0.4,0.6


    How do I find the distance from the closest surface of the cuboid?










    share|improve this question























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      Consider the situation in which I have a cuboid:



      Cuboid[0,0,0,1,1,1]


      and a point in the cubiod



      0.9,0.4,0.6


      How do I find the distance from the closest surface of the cuboid?










      share|improve this question













      Consider the situation in which I have a cuboid:



      Cuboid[0,0,0,1,1,1]


      and a point in the cubiod



      0.9,0.4,0.6


      How do I find the distance from the closest surface of the cuboid?







      geometry






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 38 mins ago









      mattiav27

      2,07011429




      2,07011429




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          How about:



          SignedRegionDistance[Cuboid[0, 0, 0, 1, 1, 1], 0.9, 0.4, 0.6]
          -0.1


          the negative sign tells you that the query point is inside the region.






          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%2f183350%2fdistance-of-a-point-from-the-closest-surface%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote













            How about:



            SignedRegionDistance[Cuboid[0, 0, 0, 1, 1, 1], 0.9, 0.4, 0.6]
            -0.1


            the negative sign tells you that the query point is inside the region.






            share|improve this answer
























              up vote
              3
              down vote













              How about:



              SignedRegionDistance[Cuboid[0, 0, 0, 1, 1, 1], 0.9, 0.4, 0.6]
              -0.1


              the negative sign tells you that the query point is inside the region.






              share|improve this answer






















                up vote
                3
                down vote










                up vote
                3
                down vote









                How about:



                SignedRegionDistance[Cuboid[0, 0, 0, 1, 1, 1], 0.9, 0.4, 0.6]
                -0.1


                the negative sign tells you that the query point is inside the region.






                share|improve this answer












                How about:



                SignedRegionDistance[Cuboid[0, 0, 0, 1, 1, 1], 0.9, 0.4, 0.6]
                -0.1


                the negative sign tells you that the query point is inside the region.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 29 mins ago









                user21

                18.1k44579




                18.1k44579



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f183350%2fdistance-of-a-point-from-the-closest-surface%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    Confectionery