TikZ specifying barycentric coordinates using just lists of numbers












4














Here's what I currently have to type:



documentclass{standalone}

usepackage{tikz}

begin{document}
begin{tikzpicture}
coordinate (a) at (90:3cm);
coordinate (b) at (210:3cm);
coordinate (c) at (-30:3cm);

node [above] at (a) {$a$};
node [below left] at (b) {$b$};
node [below right] at (c) {$c$};

draw [thick,green, fill=green,opacity=0.5]
(barycentric cs:a=1,b=0,c=0) --
(barycentric cs:a=1,b=0,c=1) --
(barycentric cs:a=1,b=1,c=0) -- cycle;

draw [ultra thick] (a) -- (b) -- (c) --cycle;
end{tikzpicture}
end{document}


This is a little tedious. Since I'll want to draw lots of shapes using the same a,b,c-based barycentric coordinates. Is there a way to pass an option to scope for example that would allow me to have (1,0,1) evaluate as (barycentric cs:a=1,b=0,c=1)?










share|improve this question



























    4














    Here's what I currently have to type:



    documentclass{standalone}

    usepackage{tikz}

    begin{document}
    begin{tikzpicture}
    coordinate (a) at (90:3cm);
    coordinate (b) at (210:3cm);
    coordinate (c) at (-30:3cm);

    node [above] at (a) {$a$};
    node [below left] at (b) {$b$};
    node [below right] at (c) {$c$};

    draw [thick,green, fill=green,opacity=0.5]
    (barycentric cs:a=1,b=0,c=0) --
    (barycentric cs:a=1,b=0,c=1) --
    (barycentric cs:a=1,b=1,c=0) -- cycle;

    draw [ultra thick] (a) -- (b) -- (c) --cycle;
    end{tikzpicture}
    end{document}


    This is a little tedious. Since I'll want to draw lots of shapes using the same a,b,c-based barycentric coordinates. Is there a way to pass an option to scope for example that would allow me to have (1,0,1) evaluate as (barycentric cs:a=1,b=0,c=1)?










    share|improve this question

























      4












      4








      4







      Here's what I currently have to type:



      documentclass{standalone}

      usepackage{tikz}

      begin{document}
      begin{tikzpicture}
      coordinate (a) at (90:3cm);
      coordinate (b) at (210:3cm);
      coordinate (c) at (-30:3cm);

      node [above] at (a) {$a$};
      node [below left] at (b) {$b$};
      node [below right] at (c) {$c$};

      draw [thick,green, fill=green,opacity=0.5]
      (barycentric cs:a=1,b=0,c=0) --
      (barycentric cs:a=1,b=0,c=1) --
      (barycentric cs:a=1,b=1,c=0) -- cycle;

      draw [ultra thick] (a) -- (b) -- (c) --cycle;
      end{tikzpicture}
      end{document}


      This is a little tedious. Since I'll want to draw lots of shapes using the same a,b,c-based barycentric coordinates. Is there a way to pass an option to scope for example that would allow me to have (1,0,1) evaluate as (barycentric cs:a=1,b=0,c=1)?










      share|improve this question













      Here's what I currently have to type:



      documentclass{standalone}

      usepackage{tikz}

      begin{document}
      begin{tikzpicture}
      coordinate (a) at (90:3cm);
      coordinate (b) at (210:3cm);
      coordinate (c) at (-30:3cm);

      node [above] at (a) {$a$};
      node [below left] at (b) {$b$};
      node [below right] at (c) {$c$};

      draw [thick,green, fill=green,opacity=0.5]
      (barycentric cs:a=1,b=0,c=0) --
      (barycentric cs:a=1,b=0,c=1) --
      (barycentric cs:a=1,b=1,c=0) -- cycle;

      draw [ultra thick] (a) -- (b) -- (c) --cycle;
      end{tikzpicture}
      end{document}


      This is a little tedious. Since I'll want to draw lots of shapes using the same a,b,c-based barycentric coordinates. Is there a way to pass an option to scope for example that would allow me to have (1,0,1) evaluate as (barycentric cs:a=1,b=0,c=1)?







      tikz-pgf diagrams coordinates






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 4 hours ago









      Seamus

      45k35216332




      45k35216332






















          3 Answers
          3






          active

          oldest

          votes


















          2














          You can define



          newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}


          and then use it as



            draw [thick,green, fill=green,opacity=0.5]
          foo{1}{0}{0} --
          foo{1}{0}{1} --
          foo{1}{1}{0} -- cycle;


          or combine with another command with 9 parameters



          newcommand{faa}[9]{
          draw [thick,green, fill=green,opacity=0.5]
          foo{#1}{#2}{#3} --
          foo{#4}{#5}{#6} --
          foo{#7}{#8}{#9} -- cycle;
          }


          and use as



          faa{1}{0}{0}{1}{0}{1}{1}{1}{1}


          enter image description here



          MWE



          documentclass{standalone}

          usepackage{tikz}
          newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}
          newcommand{faa}[9]{
          draw [thick,green, fill=green,opacity=0.5]
          foo{#1}{#2}{#3} --
          foo{#4}{#5}{#6} --
          foo{#7}{#8}{#9} -- cycle;
          }
          begin{document}
          begin{tikzpicture}
          coordinate (a) at (90:3cm);
          coordinate (b) at (210:3cm);
          coordinate (c) at (-30:3cm);

          node [above] at (a) {$a$};
          node [below left] at (b) {$b$};
          node [below right] at (c) {$c$};

          draw [thick,green, fill=green,opacity=0.5]
          foo{1}{0}{0} --
          foo{1}{0}{1} --
          foo{1}{1}{0} -- cycle;

          faa{1}{0}{0}{1}{0}{1}{1}{1}{1}

          draw [ultra thick] (a) -- (b) -- (c) --cycle;
          end{tikzpicture}
          end{document}





          share|improve this answer





























            2














            If it is ok for you to use normalized barycentric coordinates, ie (x,y,z) such that x+y+z=1, then you can simply set x=(a),y=(b),z=(c). So in place of (1,1,0) you should use (.5,.5,0).



            documentclass{standalone}
            usepackage{tikz}

            begin{document}
            begin{tikzpicture}
            path
            (90:3cm) coordinate (a) node[above] {$a$}
            (210:3cm) coordinate (b) node[below left] {$b$}
            (-30:3cm) coordinate (c) node[below right] {$c$};

            draw [thick,green, fill=green,opacity=0.5]
            (barycentric cs:a=1,b=0,c=0) --
            (barycentric cs:a=1,b=0,c=1) --
            (barycentric cs:a=1,b=1,c=0) -- cycle;

            draw [ultra thick] (a) -- (b) -- (c) --cycle;

            % set x=(a),y=(b),z=(c) and use normalized barycentric coordinates
            draw[ultra thick, red, dashed, x=(a),y=(b),z=(c)]
            (1,0,0) -- (.5,0,.5) -- (.5,.5,0) --cycle;
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer





























              1














              You can also use insert path to abbreviate the coordinates.



              documentclass{standalone}

              usepackage{tikz}

              begin{document}
              begin{tikzpicture}[bcs/.style args={#1|#2|#3}{insert path={--(barycentric
              cs:a=#1,b=#2,c=#3)}}]
              coordinate (a) at (90:3cm);
              coordinate (b) at (210:3cm);
              coordinate (c) at (-30:3cm);

              node [above] at (a) {$a$};
              node [below left] at (b) {$b$};
              node [below right] at (c) {$c$};

              draw [thick,green, fill=green,opacity=0.5] (a)
              [bcs={1|0|1},bcs={1|1|0}] -- cycle;

              draw [ultra thick] (a) -- (b) -- (c) --cycle;
              end{tikzpicture}
              end{document}


              enter image description here






              share|improve this answer























              • Every time I read your answers on TikZ I say to myself I have to study the user guide. I'm afraid the amount of new tools there I never read about!!
                – Sigur
                10 mins ago










              • @Sigur This impression never fades away, regardless how long you read it. ;-)
                – marmot
                9 mins ago











              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "85"
              };
              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: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              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
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468551%2ftikz-specifying-barycentric-coordinates-using-just-lists-of-numbers%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              You can define



              newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}


              and then use it as



                draw [thick,green, fill=green,opacity=0.5]
              foo{1}{0}{0} --
              foo{1}{0}{1} --
              foo{1}{1}{0} -- cycle;


              or combine with another command with 9 parameters



              newcommand{faa}[9]{
              draw [thick,green, fill=green,opacity=0.5]
              foo{#1}{#2}{#3} --
              foo{#4}{#5}{#6} --
              foo{#7}{#8}{#9} -- cycle;
              }


              and use as



              faa{1}{0}{0}{1}{0}{1}{1}{1}{1}


              enter image description here



              MWE



              documentclass{standalone}

              usepackage{tikz}
              newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}
              newcommand{faa}[9]{
              draw [thick,green, fill=green,opacity=0.5]
              foo{#1}{#2}{#3} --
              foo{#4}{#5}{#6} --
              foo{#7}{#8}{#9} -- cycle;
              }
              begin{document}
              begin{tikzpicture}
              coordinate (a) at (90:3cm);
              coordinate (b) at (210:3cm);
              coordinate (c) at (-30:3cm);

              node [above] at (a) {$a$};
              node [below left] at (b) {$b$};
              node [below right] at (c) {$c$};

              draw [thick,green, fill=green,opacity=0.5]
              foo{1}{0}{0} --
              foo{1}{0}{1} --
              foo{1}{1}{0} -- cycle;

              faa{1}{0}{0}{1}{0}{1}{1}{1}{1}

              draw [ultra thick] (a) -- (b) -- (c) --cycle;
              end{tikzpicture}
              end{document}





              share|improve this answer


























                2














                You can define



                newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}


                and then use it as



                  draw [thick,green, fill=green,opacity=0.5]
                foo{1}{0}{0} --
                foo{1}{0}{1} --
                foo{1}{1}{0} -- cycle;


                or combine with another command with 9 parameters



                newcommand{faa}[9]{
                draw [thick,green, fill=green,opacity=0.5]
                foo{#1}{#2}{#3} --
                foo{#4}{#5}{#6} --
                foo{#7}{#8}{#9} -- cycle;
                }


                and use as



                faa{1}{0}{0}{1}{0}{1}{1}{1}{1}


                enter image description here



                MWE



                documentclass{standalone}

                usepackage{tikz}
                newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}
                newcommand{faa}[9]{
                draw [thick,green, fill=green,opacity=0.5]
                foo{#1}{#2}{#3} --
                foo{#4}{#5}{#6} --
                foo{#7}{#8}{#9} -- cycle;
                }
                begin{document}
                begin{tikzpicture}
                coordinate (a) at (90:3cm);
                coordinate (b) at (210:3cm);
                coordinate (c) at (-30:3cm);

                node [above] at (a) {$a$};
                node [below left] at (b) {$b$};
                node [below right] at (c) {$c$};

                draw [thick,green, fill=green,opacity=0.5]
                foo{1}{0}{0} --
                foo{1}{0}{1} --
                foo{1}{1}{0} -- cycle;

                faa{1}{0}{0}{1}{0}{1}{1}{1}{1}

                draw [ultra thick] (a) -- (b) -- (c) --cycle;
                end{tikzpicture}
                end{document}





                share|improve this answer
























                  2












                  2








                  2






                  You can define



                  newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}


                  and then use it as



                    draw [thick,green, fill=green,opacity=0.5]
                  foo{1}{0}{0} --
                  foo{1}{0}{1} --
                  foo{1}{1}{0} -- cycle;


                  or combine with another command with 9 parameters



                  newcommand{faa}[9]{
                  draw [thick,green, fill=green,opacity=0.5]
                  foo{#1}{#2}{#3} --
                  foo{#4}{#5}{#6} --
                  foo{#7}{#8}{#9} -- cycle;
                  }


                  and use as



                  faa{1}{0}{0}{1}{0}{1}{1}{1}{1}


                  enter image description here



                  MWE



                  documentclass{standalone}

                  usepackage{tikz}
                  newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}
                  newcommand{faa}[9]{
                  draw [thick,green, fill=green,opacity=0.5]
                  foo{#1}{#2}{#3} --
                  foo{#4}{#5}{#6} --
                  foo{#7}{#8}{#9} -- cycle;
                  }
                  begin{document}
                  begin{tikzpicture}
                  coordinate (a) at (90:3cm);
                  coordinate (b) at (210:3cm);
                  coordinate (c) at (-30:3cm);

                  node [above] at (a) {$a$};
                  node [below left] at (b) {$b$};
                  node [below right] at (c) {$c$};

                  draw [thick,green, fill=green,opacity=0.5]
                  foo{1}{0}{0} --
                  foo{1}{0}{1} --
                  foo{1}{1}{0} -- cycle;

                  faa{1}{0}{0}{1}{0}{1}{1}{1}{1}

                  draw [ultra thick] (a) -- (b) -- (c) --cycle;
                  end{tikzpicture}
                  end{document}





                  share|improve this answer












                  You can define



                  newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}


                  and then use it as



                    draw [thick,green, fill=green,opacity=0.5]
                  foo{1}{0}{0} --
                  foo{1}{0}{1} --
                  foo{1}{1}{0} -- cycle;


                  or combine with another command with 9 parameters



                  newcommand{faa}[9]{
                  draw [thick,green, fill=green,opacity=0.5]
                  foo{#1}{#2}{#3} --
                  foo{#4}{#5}{#6} --
                  foo{#7}{#8}{#9} -- cycle;
                  }


                  and use as



                  faa{1}{0}{0}{1}{0}{1}{1}{1}{1}


                  enter image description here



                  MWE



                  documentclass{standalone}

                  usepackage{tikz}
                  newcommand{foo}[3]{(barycentric cs:a=#1,b=#2,c=#3)}
                  newcommand{faa}[9]{
                  draw [thick,green, fill=green,opacity=0.5]
                  foo{#1}{#2}{#3} --
                  foo{#4}{#5}{#6} --
                  foo{#7}{#8}{#9} -- cycle;
                  }
                  begin{document}
                  begin{tikzpicture}
                  coordinate (a) at (90:3cm);
                  coordinate (b) at (210:3cm);
                  coordinate (c) at (-30:3cm);

                  node [above] at (a) {$a$};
                  node [below left] at (b) {$b$};
                  node [below right] at (c) {$c$};

                  draw [thick,green, fill=green,opacity=0.5]
                  foo{1}{0}{0} --
                  foo{1}{0}{1} --
                  foo{1}{1}{0} -- cycle;

                  faa{1}{0}{0}{1}{0}{1}{1}{1}{1}

                  draw [ultra thick] (a) -- (b) -- (c) --cycle;
                  end{tikzpicture}
                  end{document}






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 4 hours ago









                  Sigur

                  24.1k355137




                  24.1k355137























                      2














                      If it is ok for you to use normalized barycentric coordinates, ie (x,y,z) such that x+y+z=1, then you can simply set x=(a),y=(b),z=(c). So in place of (1,1,0) you should use (.5,.5,0).



                      documentclass{standalone}
                      usepackage{tikz}

                      begin{document}
                      begin{tikzpicture}
                      path
                      (90:3cm) coordinate (a) node[above] {$a$}
                      (210:3cm) coordinate (b) node[below left] {$b$}
                      (-30:3cm) coordinate (c) node[below right] {$c$};

                      draw [thick,green, fill=green,opacity=0.5]
                      (barycentric cs:a=1,b=0,c=0) --
                      (barycentric cs:a=1,b=0,c=1) --
                      (barycentric cs:a=1,b=1,c=0) -- cycle;

                      draw [ultra thick] (a) -- (b) -- (c) --cycle;

                      % set x=(a),y=(b),z=(c) and use normalized barycentric coordinates
                      draw[ultra thick, red, dashed, x=(a),y=(b),z=(c)]
                      (1,0,0) -- (.5,0,.5) -- (.5,.5,0) --cycle;
                      end{tikzpicture}
                      end{document}


                      enter image description here






                      share|improve this answer


























                        2














                        If it is ok for you to use normalized barycentric coordinates, ie (x,y,z) such that x+y+z=1, then you can simply set x=(a),y=(b),z=(c). So in place of (1,1,0) you should use (.5,.5,0).



                        documentclass{standalone}
                        usepackage{tikz}

                        begin{document}
                        begin{tikzpicture}
                        path
                        (90:3cm) coordinate (a) node[above] {$a$}
                        (210:3cm) coordinate (b) node[below left] {$b$}
                        (-30:3cm) coordinate (c) node[below right] {$c$};

                        draw [thick,green, fill=green,opacity=0.5]
                        (barycentric cs:a=1,b=0,c=0) --
                        (barycentric cs:a=1,b=0,c=1) --
                        (barycentric cs:a=1,b=1,c=0) -- cycle;

                        draw [ultra thick] (a) -- (b) -- (c) --cycle;

                        % set x=(a),y=(b),z=(c) and use normalized barycentric coordinates
                        draw[ultra thick, red, dashed, x=(a),y=(b),z=(c)]
                        (1,0,0) -- (.5,0,.5) -- (.5,.5,0) --cycle;
                        end{tikzpicture}
                        end{document}


                        enter image description here






                        share|improve this answer
























                          2












                          2








                          2






                          If it is ok for you to use normalized barycentric coordinates, ie (x,y,z) such that x+y+z=1, then you can simply set x=(a),y=(b),z=(c). So in place of (1,1,0) you should use (.5,.5,0).



                          documentclass{standalone}
                          usepackage{tikz}

                          begin{document}
                          begin{tikzpicture}
                          path
                          (90:3cm) coordinate (a) node[above] {$a$}
                          (210:3cm) coordinate (b) node[below left] {$b$}
                          (-30:3cm) coordinate (c) node[below right] {$c$};

                          draw [thick,green, fill=green,opacity=0.5]
                          (barycentric cs:a=1,b=0,c=0) --
                          (barycentric cs:a=1,b=0,c=1) --
                          (barycentric cs:a=1,b=1,c=0) -- cycle;

                          draw [ultra thick] (a) -- (b) -- (c) --cycle;

                          % set x=(a),y=(b),z=(c) and use normalized barycentric coordinates
                          draw[ultra thick, red, dashed, x=(a),y=(b),z=(c)]
                          (1,0,0) -- (.5,0,.5) -- (.5,.5,0) --cycle;
                          end{tikzpicture}
                          end{document}


                          enter image description here






                          share|improve this answer












                          If it is ok for you to use normalized barycentric coordinates, ie (x,y,z) such that x+y+z=1, then you can simply set x=(a),y=(b),z=(c). So in place of (1,1,0) you should use (.5,.5,0).



                          documentclass{standalone}
                          usepackage{tikz}

                          begin{document}
                          begin{tikzpicture}
                          path
                          (90:3cm) coordinate (a) node[above] {$a$}
                          (210:3cm) coordinate (b) node[below left] {$b$}
                          (-30:3cm) coordinate (c) node[below right] {$c$};

                          draw [thick,green, fill=green,opacity=0.5]
                          (barycentric cs:a=1,b=0,c=0) --
                          (barycentric cs:a=1,b=0,c=1) --
                          (barycentric cs:a=1,b=1,c=0) -- cycle;

                          draw [ultra thick] (a) -- (b) -- (c) --cycle;

                          % set x=(a),y=(b),z=(c) and use normalized barycentric coordinates
                          draw[ultra thick, red, dashed, x=(a),y=(b),z=(c)]
                          (1,0,0) -- (.5,0,.5) -- (.5,.5,0) --cycle;
                          end{tikzpicture}
                          end{document}


                          enter image description here







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 1 hour ago









                          Kpym

                          15.7k23985




                          15.7k23985























                              1














                              You can also use insert path to abbreviate the coordinates.



                              documentclass{standalone}

                              usepackage{tikz}

                              begin{document}
                              begin{tikzpicture}[bcs/.style args={#1|#2|#3}{insert path={--(barycentric
                              cs:a=#1,b=#2,c=#3)}}]
                              coordinate (a) at (90:3cm);
                              coordinate (b) at (210:3cm);
                              coordinate (c) at (-30:3cm);

                              node [above] at (a) {$a$};
                              node [below left] at (b) {$b$};
                              node [below right] at (c) {$c$};

                              draw [thick,green, fill=green,opacity=0.5] (a)
                              [bcs={1|0|1},bcs={1|1|0}] -- cycle;

                              draw [ultra thick] (a) -- (b) -- (c) --cycle;
                              end{tikzpicture}
                              end{document}


                              enter image description here






                              share|improve this answer























                              • Every time I read your answers on TikZ I say to myself I have to study the user guide. I'm afraid the amount of new tools there I never read about!!
                                – Sigur
                                10 mins ago










                              • @Sigur This impression never fades away, regardless how long you read it. ;-)
                                – marmot
                                9 mins ago
















                              1














                              You can also use insert path to abbreviate the coordinates.



                              documentclass{standalone}

                              usepackage{tikz}

                              begin{document}
                              begin{tikzpicture}[bcs/.style args={#1|#2|#3}{insert path={--(barycentric
                              cs:a=#1,b=#2,c=#3)}}]
                              coordinate (a) at (90:3cm);
                              coordinate (b) at (210:3cm);
                              coordinate (c) at (-30:3cm);

                              node [above] at (a) {$a$};
                              node [below left] at (b) {$b$};
                              node [below right] at (c) {$c$};

                              draw [thick,green, fill=green,opacity=0.5] (a)
                              [bcs={1|0|1},bcs={1|1|0}] -- cycle;

                              draw [ultra thick] (a) -- (b) -- (c) --cycle;
                              end{tikzpicture}
                              end{document}


                              enter image description here






                              share|improve this answer























                              • Every time I read your answers on TikZ I say to myself I have to study the user guide. I'm afraid the amount of new tools there I never read about!!
                                – Sigur
                                10 mins ago










                              • @Sigur This impression never fades away, regardless how long you read it. ;-)
                                – marmot
                                9 mins ago














                              1












                              1








                              1






                              You can also use insert path to abbreviate the coordinates.



                              documentclass{standalone}

                              usepackage{tikz}

                              begin{document}
                              begin{tikzpicture}[bcs/.style args={#1|#2|#3}{insert path={--(barycentric
                              cs:a=#1,b=#2,c=#3)}}]
                              coordinate (a) at (90:3cm);
                              coordinate (b) at (210:3cm);
                              coordinate (c) at (-30:3cm);

                              node [above] at (a) {$a$};
                              node [below left] at (b) {$b$};
                              node [below right] at (c) {$c$};

                              draw [thick,green, fill=green,opacity=0.5] (a)
                              [bcs={1|0|1},bcs={1|1|0}] -- cycle;

                              draw [ultra thick] (a) -- (b) -- (c) --cycle;
                              end{tikzpicture}
                              end{document}


                              enter image description here






                              share|improve this answer














                              You can also use insert path to abbreviate the coordinates.



                              documentclass{standalone}

                              usepackage{tikz}

                              begin{document}
                              begin{tikzpicture}[bcs/.style args={#1|#2|#3}{insert path={--(barycentric
                              cs:a=#1,b=#2,c=#3)}}]
                              coordinate (a) at (90:3cm);
                              coordinate (b) at (210:3cm);
                              coordinate (c) at (-30:3cm);

                              node [above] at (a) {$a$};
                              node [below left] at (b) {$b$};
                              node [below right] at (c) {$c$};

                              draw [thick,green, fill=green,opacity=0.5] (a)
                              [bcs={1|0|1},bcs={1|1|0}] -- cycle;

                              draw [ultra thick] (a) -- (b) -- (c) --cycle;
                              end{tikzpicture}
                              end{document}


                              enter image description here







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited 8 mins ago

























                              answered 13 mins ago









                              marmot

                              88.5k4102190




                              88.5k4102190












                              • Every time I read your answers on TikZ I say to myself I have to study the user guide. I'm afraid the amount of new tools there I never read about!!
                                – Sigur
                                10 mins ago










                              • @Sigur This impression never fades away, regardless how long you read it. ;-)
                                – marmot
                                9 mins ago


















                              • Every time I read your answers on TikZ I say to myself I have to study the user guide. I'm afraid the amount of new tools there I never read about!!
                                – Sigur
                                10 mins ago










                              • @Sigur This impression never fades away, regardless how long you read it. ;-)
                                – marmot
                                9 mins ago
















                              Every time I read your answers on TikZ I say to myself I have to study the user guide. I'm afraid the amount of new tools there I never read about!!
                              – Sigur
                              10 mins ago




                              Every time I read your answers on TikZ I say to myself I have to study the user guide. I'm afraid the amount of new tools there I never read about!!
                              – Sigur
                              10 mins ago












                              @Sigur This impression never fades away, regardless how long you read it. ;-)
                              – marmot
                              9 mins ago




                              @Sigur This impression never fades away, regardless how long you read it. ;-)
                              – marmot
                              9 mins ago


















                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to TeX - LaTeX 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.


                              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%2ftex.stackexchange.com%2fquestions%2f468551%2ftikz-specifying-barycentric-coordinates-using-just-lists-of-numbers%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

                              Understanding the information contained in the Deep Space Network XML data?

                              Ross-on-Wye

                              Eastern Orthodox Church