Compute the Centroid of a $3D$ Planar Polygon Without Projecting It To Specific Planes

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











up vote
5
down vote

favorite
1












Given a list of coordinates of a coplanar plane $left(pt_1, pt_2, pt_3, cdots right)$, how to compute the centroid of the coplanar plane?



One way to do it is to project the plane onto $XY$ and $YZ$ plane, but I don't really favor this approach as you have to check the orientation of the coplanar plane first before doing the projection and computing the centroid.



More specifically, I'm looking for a natural extension of the 2D centroid plane algorithm in 3D:



beginalign
C_x&=frac16Asum_i=0^n-1(x_i+x_i+1)(x_iy_i+1-x_i+1y_i)\
C_y&=frac16Asum_i=0^n-1(y_i+y_i+1)(x_iy_i+1-x_i+1y_i)\
A&=frac12sum_i=0^n-1(x_iy_i+1-x_i+1y_i)
endalign



Any idea?










share|cite|improve this question



























    up vote
    5
    down vote

    favorite
    1












    Given a list of coordinates of a coplanar plane $left(pt_1, pt_2, pt_3, cdots right)$, how to compute the centroid of the coplanar plane?



    One way to do it is to project the plane onto $XY$ and $YZ$ plane, but I don't really favor this approach as you have to check the orientation of the coplanar plane first before doing the projection and computing the centroid.



    More specifically, I'm looking for a natural extension of the 2D centroid plane algorithm in 3D:



    beginalign
    C_x&=frac16Asum_i=0^n-1(x_i+x_i+1)(x_iy_i+1-x_i+1y_i)\
    C_y&=frac16Asum_i=0^n-1(y_i+y_i+1)(x_iy_i+1-x_i+1y_i)\
    A&=frac12sum_i=0^n-1(x_iy_i+1-x_i+1y_i)
    endalign



    Any idea?










    share|cite|improve this question

























      up vote
      5
      down vote

      favorite
      1









      up vote
      5
      down vote

      favorite
      1






      1





      Given a list of coordinates of a coplanar plane $left(pt_1, pt_2, pt_3, cdots right)$, how to compute the centroid of the coplanar plane?



      One way to do it is to project the plane onto $XY$ and $YZ$ plane, but I don't really favor this approach as you have to check the orientation of the coplanar plane first before doing the projection and computing the centroid.



      More specifically, I'm looking for a natural extension of the 2D centroid plane algorithm in 3D:



      beginalign
      C_x&=frac16Asum_i=0^n-1(x_i+x_i+1)(x_iy_i+1-x_i+1y_i)\
      C_y&=frac16Asum_i=0^n-1(y_i+y_i+1)(x_iy_i+1-x_i+1y_i)\
      A&=frac12sum_i=0^n-1(x_iy_i+1-x_i+1y_i)
      endalign



      Any idea?










      share|cite|improve this question















      Given a list of coordinates of a coplanar plane $left(pt_1, pt_2, pt_3, cdots right)$, how to compute the centroid of the coplanar plane?



      One way to do it is to project the plane onto $XY$ and $YZ$ plane, but I don't really favor this approach as you have to check the orientation of the coplanar plane first before doing the projection and computing the centroid.



      More specifically, I'm looking for a natural extension of the 2D centroid plane algorithm in 3D:



      beginalign
      C_x&=frac16Asum_i=0^n-1(x_i+x_i+1)(x_iy_i+1-x_i+1y_i)\
      C_y&=frac16Asum_i=0^n-1(y_i+y_i+1)(x_iy_i+1-x_i+1y_i)\
      A&=frac12sum_i=0^n-1(x_iy_i+1-x_i+1y_i)
      endalign



      Any idea?







      geometry






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Sep 3 at 9:26









      Jneven

      633320




      633320










      asked Aug 1 '10 at 11:26









      Graviton

      1,06822044




      1,06822044




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          You can take any two orthogonal vectors $vece_1$ and $vece_2$ on the plane and use them as a basis. You also need some point $(x_0, y_0, z_0)$ on the plane as origin.



          Given point with coordinates $(x_1, y_1, z_1)$ on your plane you calculate it's coordinates with respect to new basis:



          $x = (x_1 - x_0) e_1x + (y_1 - y_0) e_1y + (z_1 - z_0) e_1z$

          $y = (x_1 - x_0) e_2x + (y_1 - y_0) e_2y + (z_1 - z_0) e_2z$



          And after that you can apply your formulae to get $C_x$ and $C_y$. Those coordinates are easyly transformed back into original 3d coordinates:

          $x = x_0 + e_1x C_x + e_2x C_y$

          $y = y_0 + e_1y C_x + e_2y C_y$

          $z = z_0 + e_1z C_x + e_2z C_y$






          share|cite|improve this answer
















          • 1




            So, the final formula is?
            – Graviton
            Aug 2 '10 at 7:19










          • Also, where is Cz?
            – Graviton
            Aug 2 '10 at 11:53










          • There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d.
            – falagar
            Aug 2 '10 at 12:14






          • 1




            The answer is $(x, y, z)$ given by the last formulae.
            – falagar
            Aug 2 '10 at 12:20










          • converting this 3d problem into 2d problem is the last thing i want.
            – Graviton
            Aug 9 '10 at 12:12










          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f1338%2fcompute-the-centroid-of-a-3d-planar-polygon-without-projecting-it-to-specific%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
          4
          down vote



          accepted










          You can take any two orthogonal vectors $vece_1$ and $vece_2$ on the plane and use them as a basis. You also need some point $(x_0, y_0, z_0)$ on the plane as origin.



          Given point with coordinates $(x_1, y_1, z_1)$ on your plane you calculate it's coordinates with respect to new basis:



          $x = (x_1 - x_0) e_1x + (y_1 - y_0) e_1y + (z_1 - z_0) e_1z$

          $y = (x_1 - x_0) e_2x + (y_1 - y_0) e_2y + (z_1 - z_0) e_2z$



          And after that you can apply your formulae to get $C_x$ and $C_y$. Those coordinates are easyly transformed back into original 3d coordinates:

          $x = x_0 + e_1x C_x + e_2x C_y$

          $y = y_0 + e_1y C_x + e_2y C_y$

          $z = z_0 + e_1z C_x + e_2z C_y$






          share|cite|improve this answer
















          • 1




            So, the final formula is?
            – Graviton
            Aug 2 '10 at 7:19










          • Also, where is Cz?
            – Graviton
            Aug 2 '10 at 11:53










          • There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d.
            – falagar
            Aug 2 '10 at 12:14






          • 1




            The answer is $(x, y, z)$ given by the last formulae.
            – falagar
            Aug 2 '10 at 12:20










          • converting this 3d problem into 2d problem is the last thing i want.
            – Graviton
            Aug 9 '10 at 12:12














          up vote
          4
          down vote



          accepted










          You can take any two orthogonal vectors $vece_1$ and $vece_2$ on the plane and use them as a basis. You also need some point $(x_0, y_0, z_0)$ on the plane as origin.



          Given point with coordinates $(x_1, y_1, z_1)$ on your plane you calculate it's coordinates with respect to new basis:



          $x = (x_1 - x_0) e_1x + (y_1 - y_0) e_1y + (z_1 - z_0) e_1z$

          $y = (x_1 - x_0) e_2x + (y_1 - y_0) e_2y + (z_1 - z_0) e_2z$



          And after that you can apply your formulae to get $C_x$ and $C_y$. Those coordinates are easyly transformed back into original 3d coordinates:

          $x = x_0 + e_1x C_x + e_2x C_y$

          $y = y_0 + e_1y C_x + e_2y C_y$

          $z = z_0 + e_1z C_x + e_2z C_y$






          share|cite|improve this answer
















          • 1




            So, the final formula is?
            – Graviton
            Aug 2 '10 at 7:19










          • Also, where is Cz?
            – Graviton
            Aug 2 '10 at 11:53










          • There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d.
            – falagar
            Aug 2 '10 at 12:14






          • 1




            The answer is $(x, y, z)$ given by the last formulae.
            – falagar
            Aug 2 '10 at 12:20










          • converting this 3d problem into 2d problem is the last thing i want.
            – Graviton
            Aug 9 '10 at 12:12












          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          You can take any two orthogonal vectors $vece_1$ and $vece_2$ on the plane and use them as a basis. You also need some point $(x_0, y_0, z_0)$ on the plane as origin.



          Given point with coordinates $(x_1, y_1, z_1)$ on your plane you calculate it's coordinates with respect to new basis:



          $x = (x_1 - x_0) e_1x + (y_1 - y_0) e_1y + (z_1 - z_0) e_1z$

          $y = (x_1 - x_0) e_2x + (y_1 - y_0) e_2y + (z_1 - z_0) e_2z$



          And after that you can apply your formulae to get $C_x$ and $C_y$. Those coordinates are easyly transformed back into original 3d coordinates:

          $x = x_0 + e_1x C_x + e_2x C_y$

          $y = y_0 + e_1y C_x + e_2y C_y$

          $z = z_0 + e_1z C_x + e_2z C_y$






          share|cite|improve this answer












          You can take any two orthogonal vectors $vece_1$ and $vece_2$ on the plane and use them as a basis. You also need some point $(x_0, y_0, z_0)$ on the plane as origin.



          Given point with coordinates $(x_1, y_1, z_1)$ on your plane you calculate it's coordinates with respect to new basis:



          $x = (x_1 - x_0) e_1x + (y_1 - y_0) e_1y + (z_1 - z_0) e_1z$

          $y = (x_1 - x_0) e_2x + (y_1 - y_0) e_2y + (z_1 - z_0) e_2z$



          And after that you can apply your formulae to get $C_x$ and $C_y$. Those coordinates are easyly transformed back into original 3d coordinates:

          $x = x_0 + e_1x C_x + e_2x C_y$

          $y = y_0 + e_1y C_x + e_2y C_y$

          $z = z_0 + e_1z C_x + e_2z C_y$







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Aug 1 '10 at 15:21









          falagar

          3,4071523




          3,4071523







          • 1




            So, the final formula is?
            – Graviton
            Aug 2 '10 at 7:19










          • Also, where is Cz?
            – Graviton
            Aug 2 '10 at 11:53










          • There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d.
            – falagar
            Aug 2 '10 at 12:14






          • 1




            The answer is $(x, y, z)$ given by the last formulae.
            – falagar
            Aug 2 '10 at 12:20










          • converting this 3d problem into 2d problem is the last thing i want.
            – Graviton
            Aug 9 '10 at 12:12












          • 1




            So, the final formula is?
            – Graviton
            Aug 2 '10 at 7:19










          • Also, where is Cz?
            – Graviton
            Aug 2 '10 at 11:53










          • There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d.
            – falagar
            Aug 2 '10 at 12:14






          • 1




            The answer is $(x, y, z)$ given by the last formulae.
            – falagar
            Aug 2 '10 at 12:20










          • converting this 3d problem into 2d problem is the last thing i want.
            – Graviton
            Aug 9 '10 at 12:12







          1




          1




          So, the final formula is?
          – Graviton
          Aug 2 '10 at 7:19




          So, the final formula is?
          – Graviton
          Aug 2 '10 at 7:19












          Also, where is Cz?
          – Graviton
          Aug 2 '10 at 11:53




          Also, where is Cz?
          – Graviton
          Aug 2 '10 at 11:53












          There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d.
          – falagar
          Aug 2 '10 at 12:14




          There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d.
          – falagar
          Aug 2 '10 at 12:14




          1




          1




          The answer is $(x, y, z)$ given by the last formulae.
          – falagar
          Aug 2 '10 at 12:20




          The answer is $(x, y, z)$ given by the last formulae.
          – falagar
          Aug 2 '10 at 12:20












          converting this 3d problem into 2d problem is the last thing i want.
          – Graviton
          Aug 9 '10 at 12:12




          converting this 3d problem into 2d problem is the last thing i want.
          – Graviton
          Aug 9 '10 at 12:12

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1338%2fcompute-the-centroid-of-a-3d-planar-polygon-without-projecting-it-to-specific%23new-answer', 'question_page');

          );

          Post as a guest













































































          這個網誌中的熱門文章

          How to combine Bézier curves to a surface?

          Mutual Information Always Non-negative

          Why am i infinitely getting the same tweet with the Twitter Search API?