Tikz regular polygon corner names












4















The following code gives No shape named S.corner 1 is known. error. What am I doing wrong?



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{angles}
usetikzlibrary{shapes}
usetikzlibrary{shapes.geometric}
begin{document}
begin{tikzpicture}
node[name=S,regular polygon, regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
pic [draw, angle radius=.6cm] {angle = S.corner 1--S.corner 6--S.corner 5};
end{tikzpicture}
end{document}









share|improve this question

























  • I don't know the pic command, but draw (S.corner 1) -- (S.corner 6); works fine with your example.

    – Anthony Labarre
    Mar 15 at 16:16






  • 1





    That's the standard problem that the angle construction adds point anchors center to the coordinates.

    – marmot
    Mar 15 at 16:38
















4















The following code gives No shape named S.corner 1 is known. error. What am I doing wrong?



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{angles}
usetikzlibrary{shapes}
usetikzlibrary{shapes.geometric}
begin{document}
begin{tikzpicture}
node[name=S,regular polygon, regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
pic [draw, angle radius=.6cm] {angle = S.corner 1--S.corner 6--S.corner 5};
end{tikzpicture}
end{document}









share|improve this question

























  • I don't know the pic command, but draw (S.corner 1) -- (S.corner 6); works fine with your example.

    – Anthony Labarre
    Mar 15 at 16:16






  • 1





    That's the standard problem that the angle construction adds point anchors center to the coordinates.

    – marmot
    Mar 15 at 16:38














4












4








4








The following code gives No shape named S.corner 1 is known. error. What am I doing wrong?



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{angles}
usetikzlibrary{shapes}
usetikzlibrary{shapes.geometric}
begin{document}
begin{tikzpicture}
node[name=S,regular polygon, regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
pic [draw, angle radius=.6cm] {angle = S.corner 1--S.corner 6--S.corner 5};
end{tikzpicture}
end{document}









share|improve this question
















The following code gives No shape named S.corner 1 is known. error. What am I doing wrong?



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{angles}
usetikzlibrary{shapes}
usetikzlibrary{shapes.geometric}
begin{document}
begin{tikzpicture}
node[name=S,regular polygon, regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
pic [draw, angle radius=.6cm] {angle = S.corner 1--S.corner 6--S.corner 5};
end{tikzpicture}
end{document}






tikz-pgf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 15 at 15:46







blackened

















asked Mar 15 at 15:39









blackenedblackened

1,670714




1,670714













  • I don't know the pic command, but draw (S.corner 1) -- (S.corner 6); works fine with your example.

    – Anthony Labarre
    Mar 15 at 16:16






  • 1





    That's the standard problem that the angle construction adds point anchors center to the coordinates.

    – marmot
    Mar 15 at 16:38



















  • I don't know the pic command, but draw (S.corner 1) -- (S.corner 6); works fine with your example.

    – Anthony Labarre
    Mar 15 at 16:16






  • 1





    That's the standard problem that the angle construction adds point anchors center to the coordinates.

    – marmot
    Mar 15 at 16:38

















I don't know the pic command, but draw (S.corner 1) -- (S.corner 6); works fine with your example.

– Anthony Labarre
Mar 15 at 16:16





I don't know the pic command, but draw (S.corner 1) -- (S.corner 6); works fine with your example.

– Anthony Labarre
Mar 15 at 16:16




1




1





That's the standard problem that the angle construction adds point anchors center to the coordinates.

– marmot
Mar 15 at 16:38





That's the standard problem that the angle construction adds point anchors center to the coordinates.

– marmot
Mar 15 at 16:38










1 Answer
1






active

oldest

votes


















2














tikzlibraryangles.code.tex contains



deftikz@lib@rightangle@background#1--#2--#3pgf@stop{%
path [name prefix ..] [pic actions, draw=none] (#2.center)
-- ++(tikz@start@angle@temp:tikz@lib@angle@rad pt)
-- ++(tikz@end@angle@temp:tikz@lib@angle@rad pt)
-- ++(tikz@start@angle@temp:-tikz@lib@angle@rad pt)
-- cycle;
}%


from which you see that it attaches .center to the second coordinate #2. This does not work if #2 is already an anchor. To work around this problem (rather than redefining tikz@lib@rightangle@background and the other commands that attach .center), you may just define auxiliary coordinates.



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{angles}
usetikzlibrary{shapes}
usetikzlibrary{shapes.geometric}
begin{document}
begin{tikzpicture}
node[name=S,regular polygon,
regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
path foreach X in {1,...,9} {(S.corner X) coordinate (corner X)};
pic [draw, angle radius=.6cm] {angle = corner 1--corner 6--corner 5};
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























    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%2f479653%2ftikz-regular-polygon-corner-names%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









    2














    tikzlibraryangles.code.tex contains



    deftikz@lib@rightangle@background#1--#2--#3pgf@stop{%
    path [name prefix ..] [pic actions, draw=none] (#2.center)
    -- ++(tikz@start@angle@temp:tikz@lib@angle@rad pt)
    -- ++(tikz@end@angle@temp:tikz@lib@angle@rad pt)
    -- ++(tikz@start@angle@temp:-tikz@lib@angle@rad pt)
    -- cycle;
    }%


    from which you see that it attaches .center to the second coordinate #2. This does not work if #2 is already an anchor. To work around this problem (rather than redefining tikz@lib@rightangle@background and the other commands that attach .center), you may just define auxiliary coordinates.



    documentclass[tikz,border=10pt]{standalone}
    usetikzlibrary{angles}
    usetikzlibrary{shapes}
    usetikzlibrary{shapes.geometric}
    begin{document}
    begin{tikzpicture}
    node[name=S,regular polygon,
    regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
    path foreach X in {1,...,9} {(S.corner X) coordinate (corner X)};
    pic [draw, angle radius=.6cm] {angle = corner 1--corner 6--corner 5};
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer




























      2














      tikzlibraryangles.code.tex contains



      deftikz@lib@rightangle@background#1--#2--#3pgf@stop{%
      path [name prefix ..] [pic actions, draw=none] (#2.center)
      -- ++(tikz@start@angle@temp:tikz@lib@angle@rad pt)
      -- ++(tikz@end@angle@temp:tikz@lib@angle@rad pt)
      -- ++(tikz@start@angle@temp:-tikz@lib@angle@rad pt)
      -- cycle;
      }%


      from which you see that it attaches .center to the second coordinate #2. This does not work if #2 is already an anchor. To work around this problem (rather than redefining tikz@lib@rightangle@background and the other commands that attach .center), you may just define auxiliary coordinates.



      documentclass[tikz,border=10pt]{standalone}
      usetikzlibrary{angles}
      usetikzlibrary{shapes}
      usetikzlibrary{shapes.geometric}
      begin{document}
      begin{tikzpicture}
      node[name=S,regular polygon,
      regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
      path foreach X in {1,...,9} {(S.corner X) coordinate (corner X)};
      pic [draw, angle radius=.6cm] {angle = corner 1--corner 6--corner 5};
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer


























        2












        2








        2







        tikzlibraryangles.code.tex contains



        deftikz@lib@rightangle@background#1--#2--#3pgf@stop{%
        path [name prefix ..] [pic actions, draw=none] (#2.center)
        -- ++(tikz@start@angle@temp:tikz@lib@angle@rad pt)
        -- ++(tikz@end@angle@temp:tikz@lib@angle@rad pt)
        -- ++(tikz@start@angle@temp:-tikz@lib@angle@rad pt)
        -- cycle;
        }%


        from which you see that it attaches .center to the second coordinate #2. This does not work if #2 is already an anchor. To work around this problem (rather than redefining tikz@lib@rightangle@background and the other commands that attach .center), you may just define auxiliary coordinates.



        documentclass[tikz,border=10pt]{standalone}
        usetikzlibrary{angles}
        usetikzlibrary{shapes}
        usetikzlibrary{shapes.geometric}
        begin{document}
        begin{tikzpicture}
        node[name=S,regular polygon,
        regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
        path foreach X in {1,...,9} {(S.corner X) coordinate (corner X)};
        pic [draw, angle radius=.6cm] {angle = corner 1--corner 6--corner 5};
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer













        tikzlibraryangles.code.tex contains



        deftikz@lib@rightangle@background#1--#2--#3pgf@stop{%
        path [name prefix ..] [pic actions, draw=none] (#2.center)
        -- ++(tikz@start@angle@temp:tikz@lib@angle@rad pt)
        -- ++(tikz@end@angle@temp:tikz@lib@angle@rad pt)
        -- ++(tikz@start@angle@temp:-tikz@lib@angle@rad pt)
        -- cycle;
        }%


        from which you see that it attaches .center to the second coordinate #2. This does not work if #2 is already an anchor. To work around this problem (rather than redefining tikz@lib@rightangle@background and the other commands that attach .center), you may just define auxiliary coordinates.



        documentclass[tikz,border=10pt]{standalone}
        usetikzlibrary{angles}
        usetikzlibrary{shapes}
        usetikzlibrary{shapes.geometric}
        begin{document}
        begin{tikzpicture}
        node[name=S,regular polygon,
        regular polygon sides=9, draw, minimum width=6cm] at (0,0) {};
        path foreach X in {1,...,9} {(S.corner X) coordinate (corner X)};
        pic [draw, angle radius=.6cm] {angle = corner 1--corner 6--corner 5};
        end{tikzpicture}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 15 at 16:45









        marmotmarmot

        111k5140264




        111k5140264






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479653%2ftikz-regular-polygon-corner-names%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

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?