Trying to draw a circle with nodesSimple way to make circular arrow arc?Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Draw edge on arcNumerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?beginfigure… endfigure is not working with tikz package
Learn university maths or train for high school competitions: which is better?
What is the point of teaching coding and robotics to kids as young as six years old?
Romantic love and Buddhism
One of my friends deposited 42 pounds that he borrowed into my account. Will it affect the processing of my UK visa application?
Work Done by a time-variable Force
How to make a sine wave distortion effect?
If thermodynamics says entropy always increases, how can the universe end in heat death?
How large should a hole be for a bolt to go through?
QGIS 3.4 Python script output to console doesn't update beyond first page
What is the purpose of the Dash 8’s “TOUCHED RUNWAY” warning light?
Is the Wilcoxon rank-sum test a nonparametric alternative to the two sample t-test? Null hypotheses are different
How to verify if router firmware is legitimate
Is "那些你很冒險的夢" a common expression or just a song title?
org-capture: prompt for a target file
How can a software developer best volunteer to help childhood cancer research?
Is sometimes "how I shall" = "how shall I"?
What is a short code for generating this matrix in R?
For articles with more than 7 authors, is it compulsory to shorten it or just suggested?
Is there a spell, magical item, or any other method to accurately calculate how long ago an object/construct was created?
Why does any JavaScript code want to "cut the binding"?
OOP design for multiple user authentication
My code seems to be a train wreck
Why does California spend so much on healthcare?
How do pilots avoid thunderstorms at night over the pacific en route to Australia where there is no radar? And what if a large front develops?
Trying to draw a circle with nodes
Simple way to make circular arrow arc?Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Draw edge on arcNumerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?beginfigure… endfigure is not working with tikz package
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I am trying to draw the following image in Tikz
But all I got is
I am not able to make it into a perfect circle. The code is
documentclass[tikz,border=2mm]standalone
begindocument
begintikzpicture
coordinate (O) at (0,0);
coordinate (A) at (60:1cm);
coordinate (B) at (180:1cm);
coordinate (C) at (300:1cm);
node at (O) $+1$;
node at (A) $1$;
node at (B) $2$;
node at (C) $3$;
draw[->] (A) to [bend right] (B);
draw[->] (B) to [bend right] (C);
draw[->] (C) to [bend right] (A);
endtikzpicture
endfigure*
enddocument
Thanks is advance.
tikz-pgf nodes circles arrow-curve
add a comment
|
I am trying to draw the following image in Tikz
But all I got is
I am not able to make it into a perfect circle. The code is
documentclass[tikz,border=2mm]standalone
begindocument
begintikzpicture
coordinate (O) at (0,0);
coordinate (A) at (60:1cm);
coordinate (B) at (180:1cm);
coordinate (C) at (300:1cm);
node at (O) $+1$;
node at (A) $1$;
node at (B) $2$;
node at (C) $3$;
draw[->] (A) to [bend right] (B);
draw[->] (B) to [bend right] (C);
draw[->] (C) to [bend right] (A);
endtikzpicture
endfigure*
enddocument
Thanks is advance.
tikz-pgf nodes circles arrow-curve
add a comment
|
I am trying to draw the following image in Tikz
But all I got is
I am not able to make it into a perfect circle. The code is
documentclass[tikz,border=2mm]standalone
begindocument
begintikzpicture
coordinate (O) at (0,0);
coordinate (A) at (60:1cm);
coordinate (B) at (180:1cm);
coordinate (C) at (300:1cm);
node at (O) $+1$;
node at (A) $1$;
node at (B) $2$;
node at (C) $3$;
draw[->] (A) to [bend right] (B);
draw[->] (B) to [bend right] (C);
draw[->] (C) to [bend right] (A);
endtikzpicture
endfigure*
enddocument
Thanks is advance.
tikz-pgf nodes circles arrow-curve
I am trying to draw the following image in Tikz
But all I got is
I am not able to make it into a perfect circle. The code is
documentclass[tikz,border=2mm]standalone
begindocument
begintikzpicture
coordinate (O) at (0,0);
coordinate (A) at (60:1cm);
coordinate (B) at (180:1cm);
coordinate (C) at (300:1cm);
node at (O) $+1$;
node at (A) $1$;
node at (B) $2$;
node at (C) $3$;
draw[->] (A) to [bend right] (B);
draw[->] (B) to [bend right] (C);
draw[->] (C) to [bend right] (A);
endtikzpicture
endfigure*
enddocument
Thanks is advance.
tikz-pgf nodes circles arrow-curve
tikz-pgf nodes circles arrow-curve
asked Oct 16 at 16:43
KumarmKumarm
6854 silver badges12 bronze badges
6854 silver badges12 bronze badges
add a comment
|
add a comment
|
5 Answers
5
active
oldest
votes
Using tkz-euclide
:
documentclass[border=3mm]standalone
usepackagetkz-euclide
usetkzobjall
begindocument
begintikzpicture
tkzDefPoint(0,0)O
tkzDefPoint(60:1)A
tkzDefPoint(180:1)B
tkzDefPoint(300:1)C
tikzsetcompass style/.append style=orange,line width=0.7mm,-stealth
tkzDrawArc[delta=-10](O,A)(B)
tkzDrawArc[delta=-10](O,B)(C)
tkzDrawArc[delta=-10](O,C)(A)
node[orange] at (O) textbf+1;
node[blue] at (A) textbf1;
node[blue] at (B) textbf2;
node[blue] at (C) textbf3;
endtikzpicture
enddocument
1
Note thattkzDrawArc
draws a general arc, not a circle as required by the asker. That is why we can consider slight (and for many users insignificant) deformations of the orange paths reminiscent of circle parts. Anyway, +1 for your effort with an interesting result.
– Marian G.
Oct 16 at 19:43
@MarianG. Since all the arcs are drawn with same center (O
) and all the three points are equi-distant fromO
, I was expecting that these arcs lie on the same circle.
– nidhin
Oct 16 at 19:53
add a comment
|
Just for fun: with arcs that really run around the circle and do not require any hard coded angles, i.e. the arcs adjust to the sizes of the nodes since their end points are computed from intersections of the circle with the node boundaries. The code is more or less taken from here. Note also that the arrow heads are bent.
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,text=blue,execute at begin node=$,
execute at end node=$,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
]
defr1
% 3 nodes with possibly different sizes
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[orange]+1;
beginscope[thick,orange,-Stealth[bend]]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
beginscope[xshift=4cm]
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[red] -1;
beginscope[thick,red,Stealth[bend]-]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
endscope
endtikzpicture
enddocument
Or everything in one pic
. Then it suffices to say e.g.
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$;
Full MWE:
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
,
pics/circular diagram/.style=code=
foreach XX [count=YY starting from 1] in #1
xdefmydimYY;
path foreach XX [count=YY starting from 0] in #1
(pgfkeysvalueof/tikz/circular diagram/offset angle+YY*360/mydim:%
pgfkeysvalueof/tikz/circular diagram/radius) node[name path=aux-YY] (aux-YY) XX ;
path[circular diagram/parc] foreach XX [evaluate=XX as YY using int(mod(XX+1,mydim))]
in 0,...,thenumexprmydim-1
piccircular arc=from aux-XX to aux-YY
;,circular diagram/.cd,offset angle/.initial=0,radius/.initial=1,
parc/.style=thick,-Stealth[bend],
arcs/.code=tikzsetcircular diagram/parc/.append style=#1
]
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$
(2,2) pic[circular diagram/arcs=red,Stealth[bend]-]circular diagram=1,2,3
node[red]$-1$
(-2,-2) pic[circular diagram/.cd,arcs=purple,offset angle=45]circular
diagram=$a$,$b$,$c$,$d$
node[purple]$+1$
(2,-2) pic[circular diagram/arcs=cyan,Stealth[bend]-]circular
diagram=$a$,$b$,$c$,$d$
node[cyan]$-1$;
endtikzpicture
enddocument
add a comment
|
The following uses a static 8 degrees clearance on the circle around the nodes. Therefore it works good for the current node contents, but one might have to make adjustments to make it really fit ones use case (or someone might come up with an algorithmic way to calculate this).
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
node $+1$;
foreach[count=n]x in -60, 60, 180
node (n) at (x:1) $n$;
draw[<-] (x+8:1) arc[start angle=x+8, end angle=x+112, radius=1cm];
endtikzpicture
enddocument
add a comment
|
Purely for comparison (and because it made an interesting exercise in loops) here is a version done in Metapost using the luamplib
package.
Source
Compile with lualatex
.
documentclass[border=5mm]standalone
usepackageluatex85
usepackageluamplib
begindocument
mplibtextextlabelenable
beginmplibcode
beginfig(1);
path c[];
c[+1] = fullcircle rotated -60 scaled 55;
c[-1] = c[+1] shifted 78 right;
color s[];
s[+1] = 7/8 (red + 1/2 green);
s[-1] = 3/4 red;
for n=-1, +1:
for i=0 upto 2:
numeric p, q;
p = 8/3i;
q = 8/3(i+n);
label("$" & decimal (i+1) & "$", point p of c[n]) withcolor 2/3 blue;
drawarrow subpath(p, q) of c[n]
cutbefore fullcircle scaled 14 shifted point p of c[n]
cutafter fullcircle scaled 14 shifted point q of c[n]
withcolor s[n];
endfor
label("$" if n>0: & "+" fi & decimal n & "$", center c[n]) withcolor s[n];
endfor
endfig;
endmplibcode
enddocument
add a comment
|
A pstricks solution:
documentclass[svgnames, border =2cm]standalone
usepackagepst-node, pst-eucl, multido, auto-pst-pdf
begindocument
sffamilybfseries
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=53+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Gold, arrows= <-]OSiTi%
rput(0,0)colorGold +1
%
endpspicture
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=54+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Crimson, arrows=->]OSiTi%
rput(0,0)colorCrimson --1
%
endpspicture
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/4.0/"u003ecc by-sa 4.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%2f512497%2ftrying-to-draw-a-circle-with-nodes%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
Using tkz-euclide
:
documentclass[border=3mm]standalone
usepackagetkz-euclide
usetkzobjall
begindocument
begintikzpicture
tkzDefPoint(0,0)O
tkzDefPoint(60:1)A
tkzDefPoint(180:1)B
tkzDefPoint(300:1)C
tikzsetcompass style/.append style=orange,line width=0.7mm,-stealth
tkzDrawArc[delta=-10](O,A)(B)
tkzDrawArc[delta=-10](O,B)(C)
tkzDrawArc[delta=-10](O,C)(A)
node[orange] at (O) textbf+1;
node[blue] at (A) textbf1;
node[blue] at (B) textbf2;
node[blue] at (C) textbf3;
endtikzpicture
enddocument
1
Note thattkzDrawArc
draws a general arc, not a circle as required by the asker. That is why we can consider slight (and for many users insignificant) deformations of the orange paths reminiscent of circle parts. Anyway, +1 for your effort with an interesting result.
– Marian G.
Oct 16 at 19:43
@MarianG. Since all the arcs are drawn with same center (O
) and all the three points are equi-distant fromO
, I was expecting that these arcs lie on the same circle.
– nidhin
Oct 16 at 19:53
add a comment
|
Using tkz-euclide
:
documentclass[border=3mm]standalone
usepackagetkz-euclide
usetkzobjall
begindocument
begintikzpicture
tkzDefPoint(0,0)O
tkzDefPoint(60:1)A
tkzDefPoint(180:1)B
tkzDefPoint(300:1)C
tikzsetcompass style/.append style=orange,line width=0.7mm,-stealth
tkzDrawArc[delta=-10](O,A)(B)
tkzDrawArc[delta=-10](O,B)(C)
tkzDrawArc[delta=-10](O,C)(A)
node[orange] at (O) textbf+1;
node[blue] at (A) textbf1;
node[blue] at (B) textbf2;
node[blue] at (C) textbf3;
endtikzpicture
enddocument
1
Note thattkzDrawArc
draws a general arc, not a circle as required by the asker. That is why we can consider slight (and for many users insignificant) deformations of the orange paths reminiscent of circle parts. Anyway, +1 for your effort with an interesting result.
– Marian G.
Oct 16 at 19:43
@MarianG. Since all the arcs are drawn with same center (O
) and all the three points are equi-distant fromO
, I was expecting that these arcs lie on the same circle.
– nidhin
Oct 16 at 19:53
add a comment
|
Using tkz-euclide
:
documentclass[border=3mm]standalone
usepackagetkz-euclide
usetkzobjall
begindocument
begintikzpicture
tkzDefPoint(0,0)O
tkzDefPoint(60:1)A
tkzDefPoint(180:1)B
tkzDefPoint(300:1)C
tikzsetcompass style/.append style=orange,line width=0.7mm,-stealth
tkzDrawArc[delta=-10](O,A)(B)
tkzDrawArc[delta=-10](O,B)(C)
tkzDrawArc[delta=-10](O,C)(A)
node[orange] at (O) textbf+1;
node[blue] at (A) textbf1;
node[blue] at (B) textbf2;
node[blue] at (C) textbf3;
endtikzpicture
enddocument
Using tkz-euclide
:
documentclass[border=3mm]standalone
usepackagetkz-euclide
usetkzobjall
begindocument
begintikzpicture
tkzDefPoint(0,0)O
tkzDefPoint(60:1)A
tkzDefPoint(180:1)B
tkzDefPoint(300:1)C
tikzsetcompass style/.append style=orange,line width=0.7mm,-stealth
tkzDrawArc[delta=-10](O,A)(B)
tkzDrawArc[delta=-10](O,B)(C)
tkzDrawArc[delta=-10](O,C)(A)
node[orange] at (O) textbf+1;
node[blue] at (A) textbf1;
node[blue] at (B) textbf2;
node[blue] at (C) textbf3;
endtikzpicture
enddocument
answered Oct 16 at 19:28
nidhinnidhin
6,7272 gold badges12 silver badges32 bronze badges
6,7272 gold badges12 silver badges32 bronze badges
1
Note thattkzDrawArc
draws a general arc, not a circle as required by the asker. That is why we can consider slight (and for many users insignificant) deformations of the orange paths reminiscent of circle parts. Anyway, +1 for your effort with an interesting result.
– Marian G.
Oct 16 at 19:43
@MarianG. Since all the arcs are drawn with same center (O
) and all the three points are equi-distant fromO
, I was expecting that these arcs lie on the same circle.
– nidhin
Oct 16 at 19:53
add a comment
|
1
Note thattkzDrawArc
draws a general arc, not a circle as required by the asker. That is why we can consider slight (and for many users insignificant) deformations of the orange paths reminiscent of circle parts. Anyway, +1 for your effort with an interesting result.
– Marian G.
Oct 16 at 19:43
@MarianG. Since all the arcs are drawn with same center (O
) and all the three points are equi-distant fromO
, I was expecting that these arcs lie on the same circle.
– nidhin
Oct 16 at 19:53
1
1
Note that
tkzDrawArc
draws a general arc, not a circle as required by the asker. That is why we can consider slight (and for many users insignificant) deformations of the orange paths reminiscent of circle parts. Anyway, +1 for your effort with an interesting result.– Marian G.
Oct 16 at 19:43
Note that
tkzDrawArc
draws a general arc, not a circle as required by the asker. That is why we can consider slight (and for many users insignificant) deformations of the orange paths reminiscent of circle parts. Anyway, +1 for your effort with an interesting result.– Marian G.
Oct 16 at 19:43
@MarianG. Since all the arcs are drawn with same center (
O
) and all the three points are equi-distant from O
, I was expecting that these arcs lie on the same circle.– nidhin
Oct 16 at 19:53
@MarianG. Since all the arcs are drawn with same center (
O
) and all the three points are equi-distant from O
, I was expecting that these arcs lie on the same circle.– nidhin
Oct 16 at 19:53
add a comment
|
Just for fun: with arcs that really run around the circle and do not require any hard coded angles, i.e. the arcs adjust to the sizes of the nodes since their end points are computed from intersections of the circle with the node boundaries. The code is more or less taken from here. Note also that the arrow heads are bent.
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,text=blue,execute at begin node=$,
execute at end node=$,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
]
defr1
% 3 nodes with possibly different sizes
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[orange]+1;
beginscope[thick,orange,-Stealth[bend]]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
beginscope[xshift=4cm]
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[red] -1;
beginscope[thick,red,Stealth[bend]-]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
endscope
endtikzpicture
enddocument
Or everything in one pic
. Then it suffices to say e.g.
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$;
Full MWE:
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
,
pics/circular diagram/.style=code=
foreach XX [count=YY starting from 1] in #1
xdefmydimYY;
path foreach XX [count=YY starting from 0] in #1
(pgfkeysvalueof/tikz/circular diagram/offset angle+YY*360/mydim:%
pgfkeysvalueof/tikz/circular diagram/radius) node[name path=aux-YY] (aux-YY) XX ;
path[circular diagram/parc] foreach XX [evaluate=XX as YY using int(mod(XX+1,mydim))]
in 0,...,thenumexprmydim-1
piccircular arc=from aux-XX to aux-YY
;,circular diagram/.cd,offset angle/.initial=0,radius/.initial=1,
parc/.style=thick,-Stealth[bend],
arcs/.code=tikzsetcircular diagram/parc/.append style=#1
]
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$
(2,2) pic[circular diagram/arcs=red,Stealth[bend]-]circular diagram=1,2,3
node[red]$-1$
(-2,-2) pic[circular diagram/.cd,arcs=purple,offset angle=45]circular
diagram=$a$,$b$,$c$,$d$
node[purple]$+1$
(2,-2) pic[circular diagram/arcs=cyan,Stealth[bend]-]circular
diagram=$a$,$b$,$c$,$d$
node[cyan]$-1$;
endtikzpicture
enddocument
add a comment
|
Just for fun: with arcs that really run around the circle and do not require any hard coded angles, i.e. the arcs adjust to the sizes of the nodes since their end points are computed from intersections of the circle with the node boundaries. The code is more or less taken from here. Note also that the arrow heads are bent.
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,text=blue,execute at begin node=$,
execute at end node=$,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
]
defr1
% 3 nodes with possibly different sizes
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[orange]+1;
beginscope[thick,orange,-Stealth[bend]]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
beginscope[xshift=4cm]
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[red] -1;
beginscope[thick,red,Stealth[bend]-]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
endscope
endtikzpicture
enddocument
Or everything in one pic
. Then it suffices to say e.g.
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$;
Full MWE:
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
,
pics/circular diagram/.style=code=
foreach XX [count=YY starting from 1] in #1
xdefmydimYY;
path foreach XX [count=YY starting from 0] in #1
(pgfkeysvalueof/tikz/circular diagram/offset angle+YY*360/mydim:%
pgfkeysvalueof/tikz/circular diagram/radius) node[name path=aux-YY] (aux-YY) XX ;
path[circular diagram/parc] foreach XX [evaluate=XX as YY using int(mod(XX+1,mydim))]
in 0,...,thenumexprmydim-1
piccircular arc=from aux-XX to aux-YY
;,circular diagram/.cd,offset angle/.initial=0,radius/.initial=1,
parc/.style=thick,-Stealth[bend],
arcs/.code=tikzsetcircular diagram/parc/.append style=#1
]
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$
(2,2) pic[circular diagram/arcs=red,Stealth[bend]-]circular diagram=1,2,3
node[red]$-1$
(-2,-2) pic[circular diagram/.cd,arcs=purple,offset angle=45]circular
diagram=$a$,$b$,$c$,$d$
node[purple]$+1$
(2,-2) pic[circular diagram/arcs=cyan,Stealth[bend]-]circular
diagram=$a$,$b$,$c$,$d$
node[cyan]$-1$;
endtikzpicture
enddocument
add a comment
|
Just for fun: with arcs that really run around the circle and do not require any hard coded angles, i.e. the arcs adjust to the sizes of the nodes since their end points are computed from intersections of the circle with the node boundaries. The code is more or less taken from here. Note also that the arrow heads are bent.
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,text=blue,execute at begin node=$,
execute at end node=$,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
]
defr1
% 3 nodes with possibly different sizes
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[orange]+1;
beginscope[thick,orange,-Stealth[bend]]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
beginscope[xshift=4cm]
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[red] -1;
beginscope[thick,red,Stealth[bend]-]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
endscope
endtikzpicture
enddocument
Or everything in one pic
. Then it suffices to say e.g.
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$;
Full MWE:
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
,
pics/circular diagram/.style=code=
foreach XX [count=YY starting from 1] in #1
xdefmydimYY;
path foreach XX [count=YY starting from 0] in #1
(pgfkeysvalueof/tikz/circular diagram/offset angle+YY*360/mydim:%
pgfkeysvalueof/tikz/circular diagram/radius) node[name path=aux-YY] (aux-YY) XX ;
path[circular diagram/parc] foreach XX [evaluate=XX as YY using int(mod(XX+1,mydim))]
in 0,...,thenumexprmydim-1
piccircular arc=from aux-XX to aux-YY
;,circular diagram/.cd,offset angle/.initial=0,radius/.initial=1,
parc/.style=thick,-Stealth[bend],
arcs/.code=tikzsetcircular diagram/parc/.append style=#1
]
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$
(2,2) pic[circular diagram/arcs=red,Stealth[bend]-]circular diagram=1,2,3
node[red]$-1$
(-2,-2) pic[circular diagram/.cd,arcs=purple,offset angle=45]circular
diagram=$a$,$b$,$c$,$d$
node[purple]$+1$
(2,-2) pic[circular diagram/arcs=cyan,Stealth[bend]-]circular
diagram=$a$,$b$,$c$,$d$
node[cyan]$-1$;
endtikzpicture
enddocument
Just for fun: with arcs that really run around the circle and do not require any hard coded angles, i.e. the arcs adjust to the sizes of the nodes since their end points are computed from intersections of the circle with the node boundaries. The code is more or less taken from here. Note also that the arrow heads are bent.
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,text=blue,execute at begin node=$,
execute at end node=$,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:r) arc(n1:n3:r);
]
defr1
% 3 nodes with possibly different sizes
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[orange]+1;
beginscope[thick,orange,-Stealth[bend]]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
beginscope[xshift=4cm]
path
(0:r) node[name path=p1] (p1) 1
(120:r) node[name path=p2] (p2) 2
(240:r) node[name path=p3] (p3) 3
(0,0) node[red] -1;
beginscope[thick,red,Stealth[bend]-]
path piccircular arc=from p1 to p2
piccircular arc=from p2 to p3
piccircular arc=from p3 to p1;
endscope
endscope
endtikzpicture
enddocument
Or everything in one pic
. Then it suffices to say e.g.
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$;
Full MWE:
documentclass[border=5mm,tikz]standalone
usetikzlibraryarrows.meta,bending,calc,intersections
begindocument
begintikzpicture[nodes=circle,
pics/circular arc/.style args=from #1 to #2code=
path[name path=arc]
let p1=(#1),p2=(#2),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
draw[pic actions,
name intersections=of=#1 and arc,by=arcstart,
name intersections=of=#2 and arc,by=arcend]
let p1=(arcstart),p2=(arcend),n1=Mod(720+atan2(y1,x1),360),
n2=Mod(720+atan2(y2,x2),360),
n3=ifthenelse(abs(n1-n2)<180,n2,n2+360)
in (n1:pgfkeysvalueof/tikz/circular diagram/radius) arc(n1:n3:pgfkeysvalueof/tikz/circular diagram/radius);
,
pics/circular diagram/.style=code=
foreach XX [count=YY starting from 1] in #1
xdefmydimYY;
path foreach XX [count=YY starting from 0] in #1
(pgfkeysvalueof/tikz/circular diagram/offset angle+YY*360/mydim:%
pgfkeysvalueof/tikz/circular diagram/radius) node[name path=aux-YY] (aux-YY) XX ;
path[circular diagram/parc] foreach XX [evaluate=XX as YY using int(mod(XX+1,mydim))]
in 0,...,thenumexprmydim-1
piccircular arc=from aux-XX to aux-YY
;,circular diagram/.cd,offset angle/.initial=0,radius/.initial=1,
parc/.style=thick,-Stealth[bend],
arcs/.code=tikzsetcircular diagram/parc/.append style=#1
]
path (-2,2) pic[circular diagram/arcs=orange]circular diagram=1,2,3
node[orange]$+1$
(2,2) pic[circular diagram/arcs=red,Stealth[bend]-]circular diagram=1,2,3
node[red]$-1$
(-2,-2) pic[circular diagram/.cd,arcs=purple,offset angle=45]circular
diagram=$a$,$b$,$c$,$d$
node[purple]$+1$
(2,-2) pic[circular diagram/arcs=cyan,Stealth[bend]-]circular
diagram=$a$,$b$,$c$,$d$
node[cyan]$-1$;
endtikzpicture
enddocument
edited Oct 18 at 0:21
answered Oct 17 at 0:53
Schrödinger's catSchrödinger's cat
28k2 gold badges43 silver badges67 bronze badges
28k2 gold badges43 silver badges67 bronze badges
add a comment
|
add a comment
|
The following uses a static 8 degrees clearance on the circle around the nodes. Therefore it works good for the current node contents, but one might have to make adjustments to make it really fit ones use case (or someone might come up with an algorithmic way to calculate this).
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
node $+1$;
foreach[count=n]x in -60, 60, 180
node (n) at (x:1) $n$;
draw[<-] (x+8:1) arc[start angle=x+8, end angle=x+112, radius=1cm];
endtikzpicture
enddocument
add a comment
|
The following uses a static 8 degrees clearance on the circle around the nodes. Therefore it works good for the current node contents, but one might have to make adjustments to make it really fit ones use case (or someone might come up with an algorithmic way to calculate this).
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
node $+1$;
foreach[count=n]x in -60, 60, 180
node (n) at (x:1) $n$;
draw[<-] (x+8:1) arc[start angle=x+8, end angle=x+112, radius=1cm];
endtikzpicture
enddocument
add a comment
|
The following uses a static 8 degrees clearance on the circle around the nodes. Therefore it works good for the current node contents, but one might have to make adjustments to make it really fit ones use case (or someone might come up with an algorithmic way to calculate this).
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
node $+1$;
foreach[count=n]x in -60, 60, 180
node (n) at (x:1) $n$;
draw[<-] (x+8:1) arc[start angle=x+8, end angle=x+112, radius=1cm];
endtikzpicture
enddocument
The following uses a static 8 degrees clearance on the circle around the nodes. Therefore it works good for the current node contents, but one might have to make adjustments to make it really fit ones use case (or someone might come up with an algorithmic way to calculate this).
documentclass[border=3.14,tikz]standalone
begindocument
begintikzpicture
node $+1$;
foreach[count=n]x in -60, 60, 180
node (n) at (x:1) $n$;
draw[<-] (x+8:1) arc[start angle=x+8, end angle=x+112, radius=1cm];
endtikzpicture
enddocument
answered Oct 16 at 17:32
SkillmonSkillmon
30.3k1 gold badge30 silver badges63 bronze badges
30.3k1 gold badge30 silver badges63 bronze badges
add a comment
|
add a comment
|
Purely for comparison (and because it made an interesting exercise in loops) here is a version done in Metapost using the luamplib
package.
Source
Compile with lualatex
.
documentclass[border=5mm]standalone
usepackageluatex85
usepackageluamplib
begindocument
mplibtextextlabelenable
beginmplibcode
beginfig(1);
path c[];
c[+1] = fullcircle rotated -60 scaled 55;
c[-1] = c[+1] shifted 78 right;
color s[];
s[+1] = 7/8 (red + 1/2 green);
s[-1] = 3/4 red;
for n=-1, +1:
for i=0 upto 2:
numeric p, q;
p = 8/3i;
q = 8/3(i+n);
label("$" & decimal (i+1) & "$", point p of c[n]) withcolor 2/3 blue;
drawarrow subpath(p, q) of c[n]
cutbefore fullcircle scaled 14 shifted point p of c[n]
cutafter fullcircle scaled 14 shifted point q of c[n]
withcolor s[n];
endfor
label("$" if n>0: & "+" fi & decimal n & "$", center c[n]) withcolor s[n];
endfor
endfig;
endmplibcode
enddocument
add a comment
|
Purely for comparison (and because it made an interesting exercise in loops) here is a version done in Metapost using the luamplib
package.
Source
Compile with lualatex
.
documentclass[border=5mm]standalone
usepackageluatex85
usepackageluamplib
begindocument
mplibtextextlabelenable
beginmplibcode
beginfig(1);
path c[];
c[+1] = fullcircle rotated -60 scaled 55;
c[-1] = c[+1] shifted 78 right;
color s[];
s[+1] = 7/8 (red + 1/2 green);
s[-1] = 3/4 red;
for n=-1, +1:
for i=0 upto 2:
numeric p, q;
p = 8/3i;
q = 8/3(i+n);
label("$" & decimal (i+1) & "$", point p of c[n]) withcolor 2/3 blue;
drawarrow subpath(p, q) of c[n]
cutbefore fullcircle scaled 14 shifted point p of c[n]
cutafter fullcircle scaled 14 shifted point q of c[n]
withcolor s[n];
endfor
label("$" if n>0: & "+" fi & decimal n & "$", center c[n]) withcolor s[n];
endfor
endfig;
endmplibcode
enddocument
add a comment
|
Purely for comparison (and because it made an interesting exercise in loops) here is a version done in Metapost using the luamplib
package.
Source
Compile with lualatex
.
documentclass[border=5mm]standalone
usepackageluatex85
usepackageluamplib
begindocument
mplibtextextlabelenable
beginmplibcode
beginfig(1);
path c[];
c[+1] = fullcircle rotated -60 scaled 55;
c[-1] = c[+1] shifted 78 right;
color s[];
s[+1] = 7/8 (red + 1/2 green);
s[-1] = 3/4 red;
for n=-1, +1:
for i=0 upto 2:
numeric p, q;
p = 8/3i;
q = 8/3(i+n);
label("$" & decimal (i+1) & "$", point p of c[n]) withcolor 2/3 blue;
drawarrow subpath(p, q) of c[n]
cutbefore fullcircle scaled 14 shifted point p of c[n]
cutafter fullcircle scaled 14 shifted point q of c[n]
withcolor s[n];
endfor
label("$" if n>0: & "+" fi & decimal n & "$", center c[n]) withcolor s[n];
endfor
endfig;
endmplibcode
enddocument
Purely for comparison (and because it made an interesting exercise in loops) here is a version done in Metapost using the luamplib
package.
Source
Compile with lualatex
.
documentclass[border=5mm]standalone
usepackageluatex85
usepackageluamplib
begindocument
mplibtextextlabelenable
beginmplibcode
beginfig(1);
path c[];
c[+1] = fullcircle rotated -60 scaled 55;
c[-1] = c[+1] shifted 78 right;
color s[];
s[+1] = 7/8 (red + 1/2 green);
s[-1] = 3/4 red;
for n=-1, +1:
for i=0 upto 2:
numeric p, q;
p = 8/3i;
q = 8/3(i+n);
label("$" & decimal (i+1) & "$", point p of c[n]) withcolor 2/3 blue;
drawarrow subpath(p, q) of c[n]
cutbefore fullcircle scaled 14 shifted point p of c[n]
cutafter fullcircle scaled 14 shifted point q of c[n]
withcolor s[n];
endfor
label("$" if n>0: & "+" fi & decimal n & "$", center c[n]) withcolor s[n];
endfor
endfig;
endmplibcode
enddocument
answered Oct 16 at 18:42
ThrustonThruston
28.4k2 gold badges47 silver badges98 bronze badges
28.4k2 gold badges47 silver badges98 bronze badges
add a comment
|
add a comment
|
A pstricks solution:
documentclass[svgnames, border =2cm]standalone
usepackagepst-node, pst-eucl, multido, auto-pst-pdf
begindocument
sffamilybfseries
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=53+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Gold, arrows= <-]OSiTi%
rput(0,0)colorGold +1
%
endpspicture
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=54+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Crimson, arrows=->]OSiTi%
rput(0,0)colorCrimson --1
%
endpspicture
enddocument
add a comment
|
A pstricks solution:
documentclass[svgnames, border =2cm]standalone
usepackagepst-node, pst-eucl, multido, auto-pst-pdf
begindocument
sffamilybfseries
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=53+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Gold, arrows= <-]OSiTi%
rput(0,0)colorGold +1
%
endpspicture
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=54+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Crimson, arrows=->]OSiTi%
rput(0,0)colorCrimson --1
%
endpspicture
enddocument
add a comment
|
A pstricks solution:
documentclass[svgnames, border =2cm]standalone
usepackagepst-node, pst-eucl, multido, auto-pst-pdf
begindocument
sffamilybfseries
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=53+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Gold, arrows= <-]OSiTi%
rput(0,0)colorGold +1
%
endpspicture
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=54+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Crimson, arrows=->]OSiTi%
rput(0,0)colorCrimson --1
%
endpspicture
enddocument
A pstricks solution:
documentclass[svgnames, border =2cm]standalone
usepackagepst-node, pst-eucl, multido, auto-pst-pdf
begindocument
sffamilybfseries
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=53+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Gold, arrows= <-]OSiTi%
rput(0,0)colorGold +1
%
endpspicture
beginpspicture(-2,-2)(2,2)
pssetlinewidth=1.5pt, arrowinset=0.12, nodesep =4pt
multidoi=1+1, iangle=-60 + 120, iangles=-54+121, ianglet=54+1203%
rput(1.5; iangle)rnodeNicolorRoyalBlueipnode(1.5; iangles)Sipnode(1.5; ianglet)Ti%
pstArcOAB[linecolor=Crimson, arrows=->]OSiTi%
rput(0,0)colorCrimson --1
%
endpspicture
enddocument
answered Oct 16 at 22:05
BernardBernard
199k8 gold badges88 silver badges234 bronze badges
199k8 gold badges88 silver badges234 bronze badges
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%2f512497%2ftrying-to-draw-a-circle-with-nodes%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