Tikz regular polygon corner names
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
add a comment |
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
I don't know thepic
command, butdraw (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
add a comment |
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
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
tikz-pgf
edited Mar 15 at 15:46
blackened
asked Mar 15 at 15:39
blackenedblackened
1,670714
1,670714
I don't know thepic
command, butdraw (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
add a comment |
I don't know thepic
command, butdraw (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
add a comment |
1 Answer
1
active
oldest
votes
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}
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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}
add a comment |
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}
add a comment |
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}
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}
answered Mar 15 at 16:45
marmotmarmot
111k5140264
111k5140264
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
I don't know the
pic
command, butdraw (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