Barycentric coordinates of a triangle












3












$begingroup$


I have to do what described next:



Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$$
p_1=left(begin{array}[c],-2\-1end{array}right),
p_2=left(begin{array}[c],3\-1end{array}right),
p_1=left(begin{array}[c],1\4end{array}right),
$$
compute the barycen-tric coordinates $lambda_1,lambda_2,lambda_3$ of the point $$p=left(begin{array}[c],2\1end{array}right),$$ and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$.



Repeat this computation for the point $$p'=left(begin{array}[c],3\3end{array}right).$$ Finally, transform the triangle and the point p with the linear mapping
$$phi:R^2 to R^2, phileft(begin{array}[c],x\yend{array}right)
=left(begin{array}[c],2x-1\x-3y-2end{array}right), $$
and compute the barycen-tric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$p_1=begin{pmatrix}-2\-1end{pmatrix}$,
$p_2=begin{pmatrix}3\-1end{pmatrix}$,
$p_3=begin{pmatrix}1\4end{pmatrix}$,
compute the barycentric coordinates of the point
$p=begin{pmatrix}2\1end{pmatrix}$,
and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$. Repeat this computation with the point
$p'=begin{pmatrix}3\3end{pmatrix}$.
Finally transform the triangle and the point $p$ with the linear mapping $phi colon mathbb R^2tomathbb R^2$, $phibegin{pmatrix}x\yend{pmatrix}=begin{pmatrix}2x-1\x-3y+2end{pmatrix}$, and compute the barycentric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Any ideas on how to do this?










share|cite|improve this question











$endgroup$












  • $begingroup$
    @EdGorcenski I am using this formula at the moment en.wikipedia.org/wiki/….
    $endgroup$
    – kokos
    Oct 17 '12 at 22:48










  • $begingroup$
    @EdGorcenski If you have something to propose me I am glad to know!
    $endgroup$
    – kokos
    Oct 17 '12 at 22:50
















3












$begingroup$


I have to do what described next:



Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$$
p_1=left(begin{array}[c],-2\-1end{array}right),
p_2=left(begin{array}[c],3\-1end{array}right),
p_1=left(begin{array}[c],1\4end{array}right),
$$
compute the barycen-tric coordinates $lambda_1,lambda_2,lambda_3$ of the point $$p=left(begin{array}[c],2\1end{array}right),$$ and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$.



Repeat this computation for the point $$p'=left(begin{array}[c],3\3end{array}right).$$ Finally, transform the triangle and the point p with the linear mapping
$$phi:R^2 to R^2, phileft(begin{array}[c],x\yend{array}right)
=left(begin{array}[c],2x-1\x-3y-2end{array}right), $$
and compute the barycen-tric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$p_1=begin{pmatrix}-2\-1end{pmatrix}$,
$p_2=begin{pmatrix}3\-1end{pmatrix}$,
$p_3=begin{pmatrix}1\4end{pmatrix}$,
compute the barycentric coordinates of the point
$p=begin{pmatrix}2\1end{pmatrix}$,
and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$. Repeat this computation with the point
$p'=begin{pmatrix}3\3end{pmatrix}$.
Finally transform the triangle and the point $p$ with the linear mapping $phi colon mathbb R^2tomathbb R^2$, $phibegin{pmatrix}x\yend{pmatrix}=begin{pmatrix}2x-1\x-3y+2end{pmatrix}$, and compute the barycentric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Any ideas on how to do this?










share|cite|improve this question











$endgroup$












  • $begingroup$
    @EdGorcenski I am using this formula at the moment en.wikipedia.org/wiki/….
    $endgroup$
    – kokos
    Oct 17 '12 at 22:48










  • $begingroup$
    @EdGorcenski If you have something to propose me I am glad to know!
    $endgroup$
    – kokos
    Oct 17 '12 at 22:50














3












3








3





$begingroup$


I have to do what described next:



Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$$
p_1=left(begin{array}[c],-2\-1end{array}right),
p_2=left(begin{array}[c],3\-1end{array}right),
p_1=left(begin{array}[c],1\4end{array}right),
$$
compute the barycen-tric coordinates $lambda_1,lambda_2,lambda_3$ of the point $$p=left(begin{array}[c],2\1end{array}right),$$ and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$.



Repeat this computation for the point $$p'=left(begin{array}[c],3\3end{array}right).$$ Finally, transform the triangle and the point p with the linear mapping
$$phi:R^2 to R^2, phileft(begin{array}[c],x\yend{array}right)
=left(begin{array}[c],2x-1\x-3y-2end{array}right), $$
and compute the barycen-tric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$p_1=begin{pmatrix}-2\-1end{pmatrix}$,
$p_2=begin{pmatrix}3\-1end{pmatrix}$,
$p_3=begin{pmatrix}1\4end{pmatrix}$,
compute the barycentric coordinates of the point
$p=begin{pmatrix}2\1end{pmatrix}$,
and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$. Repeat this computation with the point
$p'=begin{pmatrix}3\3end{pmatrix}$.
Finally transform the triangle and the point $p$ with the linear mapping $phi colon mathbb R^2tomathbb R^2$, $phibegin{pmatrix}x\yend{pmatrix}=begin{pmatrix}2x-1\x-3y+2end{pmatrix}$, and compute the barycentric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Any ideas on how to do this?










share|cite|improve this question











$endgroup$




I have to do what described next:



Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$$
p_1=left(begin{array}[c],-2\-1end{array}right),
p_2=left(begin{array}[c],3\-1end{array}right),
p_1=left(begin{array}[c],1\4end{array}right),
$$
compute the barycen-tric coordinates $lambda_1,lambda_2,lambda_3$ of the point $$p=left(begin{array}[c],2\1end{array}right),$$ and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$.



Repeat this computation for the point $$p'=left(begin{array}[c],3\3end{array}right).$$ Finally, transform the triangle and the point p with the linear mapping
$$phi:R^2 to R^2, phileft(begin{array}[c],x\yend{array}right)
=left(begin{array}[c],2x-1\x-3y-2end{array}right), $$
and compute the barycen-tric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Consider the planar triangle $[p_1,p_2,p_3]$ with vertices
$p_1=begin{pmatrix}-2\-1end{pmatrix}$,
$p_2=begin{pmatrix}3\-1end{pmatrix}$,
$p_3=begin{pmatrix}1\4end{pmatrix}$,
compute the barycentric coordinates of the point
$p=begin{pmatrix}2\1end{pmatrix}$,
and verify that $p$ can indeed be expressed as the convex combination $lambda_1p_1+lambda_2p_2+lambda_3p_3$. Repeat this computation with the point
$p'=begin{pmatrix}3\3end{pmatrix}$.
Finally transform the triangle and the point $p$ with the linear mapping $phi colon mathbb R^2tomathbb R^2$, $phibegin{pmatrix}x\yend{pmatrix}=begin{pmatrix}2x-1\x-3y+2end{pmatrix}$, and compute the barycentric coordinates of the transformed point $q=phi(p)$ with respect to the transformed triangle $[q_1,q_2,q_3]$, where $q_i=phi(p_i)$, for $i=1,2,3$.




Any ideas on how to do this?







linear-algebra analytic-geometry triangle






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 16 '18 at 22:26









Ernesto Iglesias

172113




172113










asked Oct 17 '12 at 21:09









kokoskokos

234




234












  • $begingroup$
    @EdGorcenski I am using this formula at the moment en.wikipedia.org/wiki/….
    $endgroup$
    – kokos
    Oct 17 '12 at 22:48










  • $begingroup$
    @EdGorcenski If you have something to propose me I am glad to know!
    $endgroup$
    – kokos
    Oct 17 '12 at 22:50


















  • $begingroup$
    @EdGorcenski I am using this formula at the moment en.wikipedia.org/wiki/….
    $endgroup$
    – kokos
    Oct 17 '12 at 22:48










  • $begingroup$
    @EdGorcenski If you have something to propose me I am glad to know!
    $endgroup$
    – kokos
    Oct 17 '12 at 22:50
















$begingroup$
@EdGorcenski I am using this formula at the moment en.wikipedia.org/wiki/….
$endgroup$
– kokos
Oct 17 '12 at 22:48




$begingroup$
@EdGorcenski I am using this formula at the moment en.wikipedia.org/wiki/….
$endgroup$
– kokos
Oct 17 '12 at 22:48












$begingroup$
@EdGorcenski If you have something to propose me I am glad to know!
$endgroup$
– kokos
Oct 17 '12 at 22:50




$begingroup$
@EdGorcenski If you have something to propose me I am glad to know!
$endgroup$
– kokos
Oct 17 '12 at 22:50










2 Answers
2






active

oldest

votes


















0












$begingroup$

To calculate the barycentric cooordinates of a point wrt a given triangle, the wikipedia formulae are fine. You can write the formulae in terms of triangle areas or vector cross products, instead, if you want. This makes them look tidier, certainly, and provides some intuituion: http://mathworld.wolfram.com/BarycentricCoordinates.html



If you're writing code, the formulae based on areas or cross products will be more convenient if you already have functions for computing the latter.



Again, if you're writing code, you have to think about which two coordinates you will get from the quotient formulae, and which one you'll compute by subtraction. Some calculations will be more stable than others.






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    By definition you want to find $lambda_1$, $lambda_2$, $lambda_3$ such that $p=lambda_1p_1+lambda_2p_2+lambda_3p_3$ and $lambda_1+lambda_2+lambda_3=1$. This give you three linear equations with three variables. For example, in the case of the point $p$ you will get
    $$
    begin{align*}
    lambda_1+lambda_2+lambda_3&=1\
    -2lambda_1+3lambda_2+lambda_3&=2\
    -lambda_1-lambda_2+4lambda_3&=1\
    end{align*}
    $$



    If you solve this system, you get $lambda_1=frac1{25}$, $lambda_2=frac{14}{25}$, $lambda_3=frac25$. You can try to solve the remaining ones in this way. (Please, include what you get to show your work.)



    The second part is related to the fact that affine functions preserve barycentric combinations.






    share|cite|improve this answer









    $endgroup$













      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',
      autoActivateHeartbeat: false,
      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%2f215902%2fbarycentric-coordinates-of-a-triangle%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0












      $begingroup$

      To calculate the barycentric cooordinates of a point wrt a given triangle, the wikipedia formulae are fine. You can write the formulae in terms of triangle areas or vector cross products, instead, if you want. This makes them look tidier, certainly, and provides some intuituion: http://mathworld.wolfram.com/BarycentricCoordinates.html



      If you're writing code, the formulae based on areas or cross products will be more convenient if you already have functions for computing the latter.



      Again, if you're writing code, you have to think about which two coordinates you will get from the quotient formulae, and which one you'll compute by subtraction. Some calculations will be more stable than others.






      share|cite|improve this answer









      $endgroup$


















        0












        $begingroup$

        To calculate the barycentric cooordinates of a point wrt a given triangle, the wikipedia formulae are fine. You can write the formulae in terms of triangle areas or vector cross products, instead, if you want. This makes them look tidier, certainly, and provides some intuituion: http://mathworld.wolfram.com/BarycentricCoordinates.html



        If you're writing code, the formulae based on areas or cross products will be more convenient if you already have functions for computing the latter.



        Again, if you're writing code, you have to think about which two coordinates you will get from the quotient formulae, and which one you'll compute by subtraction. Some calculations will be more stable than others.






        share|cite|improve this answer









        $endgroup$
















          0












          0








          0





          $begingroup$

          To calculate the barycentric cooordinates of a point wrt a given triangle, the wikipedia formulae are fine. You can write the formulae in terms of triangle areas or vector cross products, instead, if you want. This makes them look tidier, certainly, and provides some intuituion: http://mathworld.wolfram.com/BarycentricCoordinates.html



          If you're writing code, the formulae based on areas or cross products will be more convenient if you already have functions for computing the latter.



          Again, if you're writing code, you have to think about which two coordinates you will get from the quotient formulae, and which one you'll compute by subtraction. Some calculations will be more stable than others.






          share|cite|improve this answer









          $endgroup$



          To calculate the barycentric cooordinates of a point wrt a given triangle, the wikipedia formulae are fine. You can write the formulae in terms of triangle areas or vector cross products, instead, if you want. This makes them look tidier, certainly, and provides some intuituion: http://mathworld.wolfram.com/BarycentricCoordinates.html



          If you're writing code, the formulae based on areas or cross products will be more convenient if you already have functions for computing the latter.



          Again, if you're writing code, you have to think about which two coordinates you will get from the quotient formulae, and which one you'll compute by subtraction. Some calculations will be more stable than others.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Oct 18 '12 at 5:00









          bubbabubba

          30.3k33086




          30.3k33086























              0












              $begingroup$

              By definition you want to find $lambda_1$, $lambda_2$, $lambda_3$ such that $p=lambda_1p_1+lambda_2p_2+lambda_3p_3$ and $lambda_1+lambda_2+lambda_3=1$. This give you three linear equations with three variables. For example, in the case of the point $p$ you will get
              $$
              begin{align*}
              lambda_1+lambda_2+lambda_3&=1\
              -2lambda_1+3lambda_2+lambda_3&=2\
              -lambda_1-lambda_2+4lambda_3&=1\
              end{align*}
              $$



              If you solve this system, you get $lambda_1=frac1{25}$, $lambda_2=frac{14}{25}$, $lambda_3=frac25$. You can try to solve the remaining ones in this way. (Please, include what you get to show your work.)



              The second part is related to the fact that affine functions preserve barycentric combinations.






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                By definition you want to find $lambda_1$, $lambda_2$, $lambda_3$ such that $p=lambda_1p_1+lambda_2p_2+lambda_3p_3$ and $lambda_1+lambda_2+lambda_3=1$. This give you three linear equations with three variables. For example, in the case of the point $p$ you will get
                $$
                begin{align*}
                lambda_1+lambda_2+lambda_3&=1\
                -2lambda_1+3lambda_2+lambda_3&=2\
                -lambda_1-lambda_2+4lambda_3&=1\
                end{align*}
                $$



                If you solve this system, you get $lambda_1=frac1{25}$, $lambda_2=frac{14}{25}$, $lambda_3=frac25$. You can try to solve the remaining ones in this way. (Please, include what you get to show your work.)



                The second part is related to the fact that affine functions preserve barycentric combinations.






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  By definition you want to find $lambda_1$, $lambda_2$, $lambda_3$ such that $p=lambda_1p_1+lambda_2p_2+lambda_3p_3$ and $lambda_1+lambda_2+lambda_3=1$. This give you three linear equations with three variables. For example, in the case of the point $p$ you will get
                  $$
                  begin{align*}
                  lambda_1+lambda_2+lambda_3&=1\
                  -2lambda_1+3lambda_2+lambda_3&=2\
                  -lambda_1-lambda_2+4lambda_3&=1\
                  end{align*}
                  $$



                  If you solve this system, you get $lambda_1=frac1{25}$, $lambda_2=frac{14}{25}$, $lambda_3=frac25$. You can try to solve the remaining ones in this way. (Please, include what you get to show your work.)



                  The second part is related to the fact that affine functions preserve barycentric combinations.






                  share|cite|improve this answer









                  $endgroup$



                  By definition you want to find $lambda_1$, $lambda_2$, $lambda_3$ such that $p=lambda_1p_1+lambda_2p_2+lambda_3p_3$ and $lambda_1+lambda_2+lambda_3=1$. This give you three linear equations with three variables. For example, in the case of the point $p$ you will get
                  $$
                  begin{align*}
                  lambda_1+lambda_2+lambda_3&=1\
                  -2lambda_1+3lambda_2+lambda_3&=2\
                  -lambda_1-lambda_2+4lambda_3&=1\
                  end{align*}
                  $$



                  If you solve this system, you get $lambda_1=frac1{25}$, $lambda_2=frac{14}{25}$, $lambda_3=frac25$. You can try to solve the remaining ones in this way. (Please, include what you get to show your work.)



                  The second part is related to the fact that affine functions preserve barycentric combinations.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered May 28 '15 at 7:19









                  Martin SleziakMartin Sleziak

                  44.8k9118272




                  44.8k9118272






























                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f215902%2fbarycentric-coordinates-of-a-triangle%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

                      Mario Kart Wii

                      What does “Dominus providebit” mean?

                      Antonio Litta Visconti Arese