Connecting circles clockwise in TikZHow is arc defined in TikZ?How do you make nodes form a perfect circle?What does the colon in Tikz coordinates mean?Custom draws in matrix nodes in tikz v3 with referencingtikz, pgfplots and polaraxisPGF: draw longitudinal arcs in 3D axis environmentTikZ: Drawing an arc from an intersection to an intersectionDraw a sphere in TikzLine up nested tikz enviroments or how to get rid of themPerfectly circular arc on image with non-1:1 aspect ratioHow can I draw a curved surface in a polar coordinate system?Drawing graph with Tikz: Link it with main text without overlapping with textLengths and coordinates in TikZ arcs
How to politely tell someone they did not hit "reply to all" in an email?
Of strange atmospheres - the survivable but unbreathable
Is the field of q-series 'dead'?
Am I a new writer?
Can a person survive on blood in place of water?
Can I connect my older mathematica front-end to the free wolfram engine?
Website returning plaintext password
Count Even Digits In Number
What was Stree?
How should I introduce map drawing to my players?
Can I tell a prospective employee that everyone in the team is leaving?
How to ignore kerning of underbrace in math mode
Why do Russians almost not use verbs of possession akin to "have"?
Did 20% of US soldiers in Vietnam use heroin, 95% of whom quit afterwards?
How can I select seats on Amtrak train?
Where have Brexit voters gone?
Defining the standard model of PA so that a space alien could understand
How did NASA Langley end up with the first 737?
Is the Indo-European language family made up?
Python program to take in two strings and print the larger string
How to reverse input order?
I know that there is a preselected candidate for a position to be filled at my department. What should I do?
Why would Ryanair allow me to book this journey through a third party, but not through their own website?
Why does the hash of infinity have the digits of π?
Connecting circles clockwise in TikZ
How is arc defined in TikZ?How do you make nodes form a perfect circle?What does the colon in Tikz coordinates mean?Custom draws in matrix nodes in tikz v3 with referencingtikz, pgfplots and polaraxisPGF: draw longitudinal arcs in 3D axis environmentTikZ: Drawing an arc from an intersection to an intersectionDraw a sphere in TikzLine up nested tikz enviroments or how to get rid of themPerfectly circular arc on image with non-1:1 aspect ratioHow can I draw a curved surface in a polar coordinate system?Drawing graph with Tikz: Link it with main text without overlapping with textLengths and coordinates in TikZ arcs
I need this to work with any n I decide to set in TikZ (because the diagram at this point is undetermined). I don't mind setting margin manually, but no arcs except the one from node 3 to 4 connect correctly, and I'm clearly not good at working with polar coordinates.
This is a modified version of http://www.texample.net/tikz/examples/cycle/, except I would like for it to start on the left, and it needs to be clockwise.
documentclassarticle
usepackagetikz
begindocument
begincenter
begintikzpicture[scale=0.7]
def n 5
def radius 3cm
def margin 8.2 % margin in angles, depends on the radius
% https://tex.stackexchange.com/questions/47172/what-does-the-colon-in-tikz-coordinates-mean
% http://www.texample.net/tikz/examples/cycle/
foreach s in 1,...,n
node[draw, circle] at (180 - 360/n * (s - 1):radius) $s$;
draw[->, >=latex] (180 - 360/n * (s - 1)-margin:radius)
% https://tex.stackexchange.com/questions/175016/how-is-arc-defined-in-tikz
arc (2*margin:-(180/n) + 2* margin :(radius * 1.5);
endtikzpicture
endcenter
enddocument
Output:

tikz-pgf arc
add a comment |
I need this to work with any n I decide to set in TikZ (because the diagram at this point is undetermined). I don't mind setting margin manually, but no arcs except the one from node 3 to 4 connect correctly, and I'm clearly not good at working with polar coordinates.
This is a modified version of http://www.texample.net/tikz/examples/cycle/, except I would like for it to start on the left, and it needs to be clockwise.
documentclassarticle
usepackagetikz
begindocument
begincenter
begintikzpicture[scale=0.7]
def n 5
def radius 3cm
def margin 8.2 % margin in angles, depends on the radius
% https://tex.stackexchange.com/questions/47172/what-does-the-colon-in-tikz-coordinates-mean
% http://www.texample.net/tikz/examples/cycle/
foreach s in 1,...,n
node[draw, circle] at (180 - 360/n * (s - 1):radius) $s$;
draw[->, >=latex] (180 - 360/n * (s - 1)-margin:radius)
% https://tex.stackexchange.com/questions/175016/how-is-arc-defined-in-tikz
arc (2*margin:-(180/n) + 2* margin :(radius * 1.5);
endtikzpicture
endcenter
enddocument
Output:

tikz-pgf arc
add a comment |
I need this to work with any n I decide to set in TikZ (because the diagram at this point is undetermined). I don't mind setting margin manually, but no arcs except the one from node 3 to 4 connect correctly, and I'm clearly not good at working with polar coordinates.
This is a modified version of http://www.texample.net/tikz/examples/cycle/, except I would like for it to start on the left, and it needs to be clockwise.
documentclassarticle
usepackagetikz
begindocument
begincenter
begintikzpicture[scale=0.7]
def n 5
def radius 3cm
def margin 8.2 % margin in angles, depends on the radius
% https://tex.stackexchange.com/questions/47172/what-does-the-colon-in-tikz-coordinates-mean
% http://www.texample.net/tikz/examples/cycle/
foreach s in 1,...,n
node[draw, circle] at (180 - 360/n * (s - 1):radius) $s$;
draw[->, >=latex] (180 - 360/n * (s - 1)-margin:radius)
% https://tex.stackexchange.com/questions/175016/how-is-arc-defined-in-tikz
arc (2*margin:-(180/n) + 2* margin :(radius * 1.5);
endtikzpicture
endcenter
enddocument
Output:

tikz-pgf arc
I need this to work with any n I decide to set in TikZ (because the diagram at this point is undetermined). I don't mind setting margin manually, but no arcs except the one from node 3 to 4 connect correctly, and I'm clearly not good at working with polar coordinates.
This is a modified version of http://www.texample.net/tikz/examples/cycle/, except I would like for it to start on the left, and it needs to be clockwise.
documentclassarticle
usepackagetikz
begindocument
begincenter
begintikzpicture[scale=0.7]
def n 5
def radius 3cm
def margin 8.2 % margin in angles, depends on the radius
% https://tex.stackexchange.com/questions/47172/what-does-the-colon-in-tikz-coordinates-mean
% http://www.texample.net/tikz/examples/cycle/
foreach s in 1,...,n
node[draw, circle] at (180 - 360/n * (s - 1):radius) $s$;
draw[->, >=latex] (180 - 360/n * (s - 1)-margin:radius)
% https://tex.stackexchange.com/questions/175016/how-is-arc-defined-in-tikz
arc (2*margin:-(180/n) + 2* margin :(radius * 1.5);
endtikzpicture
endcenter
enddocument
Output:

tikz-pgf arc
tikz-pgf arc
edited May 18 at 18:54
Clarinetist
asked May 18 at 18:11
ClarinetistClarinetist
755625
755625
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n*(1-s):-radius) s;
draw[-latex] (360/n*(1-s)-margin:-radius)
arc (360/n*(1-s)-margin:-360/n*s+margin:-radius);
endtikzpicture
enddocument
add a comment |
Following the example you linked, you can change the degree at which nodes are drawn and the direction of the arrowhead in draw:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n * (n - s - 1):radius) $s$;
draw[<-, =>latex] (360/n * (s - 1)+margin:radius)
arc (360/n * (s - 1)+margin:360/n * (s)-margin:radius);
endtikzpicture

2
It is 1 -> 2 -> 3 -> 4 -> 5 -> 1, not 1 -> 5... It is not that easy
– JouleV
May 18 at 18:41
1
Just replacedraw[<-, >=latex]...bydraw[-latex] ...?
– marmot
May 18 at 18:45
@marmot, thanks for the tip!
– jGaboardi
May 18 at 18:48
1
This solution does not start the first node at the left, and does not have clockwise arcs.
– Clarinetist
May 18 at 18:58
1
Oh, I just see. It is okay now - downvote retracted
– JouleV
May 19 at 6:36
|
show 1 more comment
As pointed out here, this is a tree, and such trees understand clockwise.
documentclass[tikz,border=3.14mm]standalone
usetikzlibrarytrees
begindocument
begintikzpicture[circ/.style=circle,draw,
level 1/.style=sibling angle=72,level distance=pi*1cm,
edge from parent/.style= draw=none]
coordinate (Center) [clockwise from=270]
child foreach X in 1,...,5 node[circ] (X) X;
foreach X [remember=X as LastX (initially 5)] in 1,...,5
draw[-latex] (LastX) to[bend left=28] (X);
endtikzpicture
enddocument

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%2f491517%2fconnecting-circles-clockwise-in-tikz%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
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n*(1-s):-radius) s;
draw[-latex] (360/n*(1-s)-margin:-radius)
arc (360/n*(1-s)-margin:-360/n*s+margin:-radius);
endtikzpicture
enddocument
add a comment |
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n*(1-s):-radius) s;
draw[-latex] (360/n*(1-s)-margin:-radius)
arc (360/n*(1-s)-margin:-360/n*s+margin:-radius);
endtikzpicture
enddocument
add a comment |
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n*(1-s):-radius) s;
draw[-latex] (360/n*(1-s)-margin:-radius)
arc (360/n*(1-s)-margin:-360/n*s+margin:-radius);
endtikzpicture
enddocument
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n*(1-s):-radius) s;
draw[-latex] (360/n*(1-s)-margin:-radius)
arc (360/n*(1-s)-margin:-360/n*s+margin:-radius);
endtikzpicture
enddocument
answered May 18 at 19:38
AboAmmarAboAmmar
35.4k32985
35.4k32985
add a comment |
add a comment |
Following the example you linked, you can change the degree at which nodes are drawn and the direction of the arrowhead in draw:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n * (n - s - 1):radius) $s$;
draw[<-, =>latex] (360/n * (s - 1)+margin:radius)
arc (360/n * (s - 1)+margin:360/n * (s)-margin:radius);
endtikzpicture

2
It is 1 -> 2 -> 3 -> 4 -> 5 -> 1, not 1 -> 5... It is not that easy
– JouleV
May 18 at 18:41
1
Just replacedraw[<-, >=latex]...bydraw[-latex] ...?
– marmot
May 18 at 18:45
@marmot, thanks for the tip!
– jGaboardi
May 18 at 18:48
1
This solution does not start the first node at the left, and does not have clockwise arcs.
– Clarinetist
May 18 at 18:58
1
Oh, I just see. It is okay now - downvote retracted
– JouleV
May 19 at 6:36
|
show 1 more comment
Following the example you linked, you can change the degree at which nodes are drawn and the direction of the arrowhead in draw:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n * (n - s - 1):radius) $s$;
draw[<-, =>latex] (360/n * (s - 1)+margin:radius)
arc (360/n * (s - 1)+margin:360/n * (s)-margin:radius);
endtikzpicture

2
It is 1 -> 2 -> 3 -> 4 -> 5 -> 1, not 1 -> 5... It is not that easy
– JouleV
May 18 at 18:41
1
Just replacedraw[<-, >=latex]...bydraw[-latex] ...?
– marmot
May 18 at 18:45
@marmot, thanks for the tip!
– jGaboardi
May 18 at 18:48
1
This solution does not start the first node at the left, and does not have clockwise arcs.
– Clarinetist
May 18 at 18:58
1
Oh, I just see. It is okay now - downvote retracted
– JouleV
May 19 at 6:36
|
show 1 more comment
Following the example you linked, you can change the degree at which nodes are drawn and the direction of the arrowhead in draw:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n * (n - s - 1):radius) $s$;
draw[<-, =>latex] (360/n * (s - 1)+margin:radius)
arc (360/n * (s - 1)+margin:360/n * (s)-margin:radius);
endtikzpicture

Following the example you linked, you can change the degree at which nodes are drawn and the direction of the arrowhead in draw:
documentclassarticle
usepackagetikz
begindocument
begintikzpicture
def n 5
def radius 3cm
def margin 8 % margin in angles, depends on the radius
foreach s in 1,...,n
node[draw, circle] at (360/n * (n - s - 1):radius) $s$;
draw[<-, =>latex] (360/n * (s - 1)+margin:radius)
arc (360/n * (s - 1)+margin:360/n * (s)-margin:radius);
endtikzpicture

edited May 18 at 19:41
answered May 18 at 18:40
jGaboardijGaboardi
192113
192113
2
It is 1 -> 2 -> 3 -> 4 -> 5 -> 1, not 1 -> 5... It is not that easy
– JouleV
May 18 at 18:41
1
Just replacedraw[<-, >=latex]...bydraw[-latex] ...?
– marmot
May 18 at 18:45
@marmot, thanks for the tip!
– jGaboardi
May 18 at 18:48
1
This solution does not start the first node at the left, and does not have clockwise arcs.
– Clarinetist
May 18 at 18:58
1
Oh, I just see. It is okay now - downvote retracted
– JouleV
May 19 at 6:36
|
show 1 more comment
2
It is 1 -> 2 -> 3 -> 4 -> 5 -> 1, not 1 -> 5... It is not that easy
– JouleV
May 18 at 18:41
1
Just replacedraw[<-, >=latex]...bydraw[-latex] ...?
– marmot
May 18 at 18:45
@marmot, thanks for the tip!
– jGaboardi
May 18 at 18:48
1
This solution does not start the first node at the left, and does not have clockwise arcs.
– Clarinetist
May 18 at 18:58
1
Oh, I just see. It is okay now - downvote retracted
– JouleV
May 19 at 6:36
2
2
It is 1 -> 2 -> 3 -> 4 -> 5 -> 1, not 1 -> 5... It is not that easy
– JouleV
May 18 at 18:41
It is 1 -> 2 -> 3 -> 4 -> 5 -> 1, not 1 -> 5... It is not that easy
– JouleV
May 18 at 18:41
1
1
Just replace
draw[<-, >=latex]... by draw[-latex] ...?– marmot
May 18 at 18:45
Just replace
draw[<-, >=latex]... by draw[-latex] ...?– marmot
May 18 at 18:45
@marmot, thanks for the tip!
– jGaboardi
May 18 at 18:48
@marmot, thanks for the tip!
– jGaboardi
May 18 at 18:48
1
1
This solution does not start the first node at the left, and does not have clockwise arcs.
– Clarinetist
May 18 at 18:58
This solution does not start the first node at the left, and does not have clockwise arcs.
– Clarinetist
May 18 at 18:58
1
1
Oh, I just see. It is okay now - downvote retracted
– JouleV
May 19 at 6:36
Oh, I just see. It is okay now - downvote retracted
– JouleV
May 19 at 6:36
|
show 1 more comment
As pointed out here, this is a tree, and such trees understand clockwise.
documentclass[tikz,border=3.14mm]standalone
usetikzlibrarytrees
begindocument
begintikzpicture[circ/.style=circle,draw,
level 1/.style=sibling angle=72,level distance=pi*1cm,
edge from parent/.style= draw=none]
coordinate (Center) [clockwise from=270]
child foreach X in 1,...,5 node[circ] (X) X;
foreach X [remember=X as LastX (initially 5)] in 1,...,5
draw[-latex] (LastX) to[bend left=28] (X);
endtikzpicture
enddocument

add a comment |
As pointed out here, this is a tree, and such trees understand clockwise.
documentclass[tikz,border=3.14mm]standalone
usetikzlibrarytrees
begindocument
begintikzpicture[circ/.style=circle,draw,
level 1/.style=sibling angle=72,level distance=pi*1cm,
edge from parent/.style= draw=none]
coordinate (Center) [clockwise from=270]
child foreach X in 1,...,5 node[circ] (X) X;
foreach X [remember=X as LastX (initially 5)] in 1,...,5
draw[-latex] (LastX) to[bend left=28] (X);
endtikzpicture
enddocument

add a comment |
As pointed out here, this is a tree, and such trees understand clockwise.
documentclass[tikz,border=3.14mm]standalone
usetikzlibrarytrees
begindocument
begintikzpicture[circ/.style=circle,draw,
level 1/.style=sibling angle=72,level distance=pi*1cm,
edge from parent/.style= draw=none]
coordinate (Center) [clockwise from=270]
child foreach X in 1,...,5 node[circ] (X) X;
foreach X [remember=X as LastX (initially 5)] in 1,...,5
draw[-latex] (LastX) to[bend left=28] (X);
endtikzpicture
enddocument

As pointed out here, this is a tree, and such trees understand clockwise.
documentclass[tikz,border=3.14mm]standalone
usetikzlibrarytrees
begindocument
begintikzpicture[circ/.style=circle,draw,
level 1/.style=sibling angle=72,level distance=pi*1cm,
edge from parent/.style= draw=none]
coordinate (Center) [clockwise from=270]
child foreach X in 1,...,5 node[circ] (X) X;
foreach X [remember=X as LastX (initially 5)] in 1,...,5
draw[-latex] (LastX) to[bend left=28] (X);
endtikzpicture
enddocument

answered May 18 at 19:42
marmotmarmot
129k6163310
129k6163310
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%2f491517%2fconnecting-circles-clockwise-in-tikz%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
