How to make the vertices not connect to arrows?











up vote
2
down vote

favorite












I draw the following graph in Metapost. How to make the vertices of the subgraph with red edges not connect to arrows. The graph I obtained is
enter image description here



I want the vertices looks like the following picture (there is small space between a vertex and the arrows connnected to it). Thank you very much.



enter image description here



beginfig(1) ;
pair A,L,R,N,q;
path p;

A[1] := (0,2cm);

for i=2 upto 5:
A[i] := A[i-1] rotated -360/5;
endfor;

label.top(btex 1 etex, A[1]);
label.rt(btex 2 etex, A[2]);
label.bot(btex 3 etex, A[3]);
label.bot(btex 4 etex, A[4]);
label.lft(btex 5 etex, A[5]);


for i=1 upto 5:
q[i]:=A[i] rotated -36;
endfor;

q[6]:=0.5[A[1], A[4]];

for i=1 upto 6:
draw q[i] withpen pencircle scaled 2bp;
endfor;


for i=1 upto 5:
draw A[i] withpen pencircle scaled 2bp;
endfor;

N[1]:=0.5[A[1],A[4]];
N[2]:=1.5[A[5],N[1]];
N[3]:=0.5[A[5],N[1]];

p[1]:=A[1]..N[2]..A[4];
p[2]:=A[4]..N[3]..A[1];

draw p[1];
draw p[2];

drawarrow subpath(0,1) of p[1];
drawarrow subpath(0,0.2) of p[1];
drawarrow subpath(0,1.8) of p[1];

drawarrow subpath(0,1) of p[2];
drawarrow subpath(0,0.2) of p[2];
drawarrow subpath(0,1.8) of p[2];

N[1]:=0.5[A[2],A[5]];
N[2]:=0.5[A[1],N[1]];

p[3]:=A[2]..N[2]..A[5];


draw p[3];

drawarrow subpath(0,1.3) of p[3];
drawarrow subpath(0,0.5) of p[3];
drawarrow subpath(0,1.8) of p[3];

N[1]:=0.5[A[5],A[3]];
N[2]:=0.5[A[4],N[1]];

p[4]:=A[5]..N[2]..A[3];


draw p[4];

drawarrow subpath(0,0.8) of p[4];
drawarrow subpath(0,0.3) of p[4];
drawarrow subpath(0,1.8) of p[4];

p[5]:=A[3]..A[2];


draw p[5];
drawarrow subpath(0,0.5) of p[5];


drawarrow q[2]..A[2]..q[1] withcolor red;
drawarrow q[5]..A[1]..q[1] withcolor red;
drawarrow q[5]..A[5]..q[4] withcolor red;
drawarrow q[3]..A[4]..q[4] withcolor red;
drawarrow q[3]..A[3]..q[2] withcolor red;


drawarrow q[1].. p[1] intersectionpoint p[3] ..q[6] withcolor red;
drawarrow q[6].. p[3] intersectionpoint p[2] ..q[5] withcolor red;
drawarrow q[4].. p[4] intersectionpoint p[2] ..q[6] withcolor red;
drawarrow q[6].. p[4] intersectionpoint p[1] ..q[3] withcolor red;


endfig;

end









share|improve this question
























  • Just an honest question to the upvoters? Is this latex related (in order of this site) or there is a better forum to ask this question?
    – koleygr
    5 hours ago








  • 1




    @koleygr METAPOST is part of TeX systems, shipped with texlive and friends. Btw this is TeX S.E., not LaTeX S.E. There also plain TeX users, ConTeXt users and more here.
    – sztruks
    5 hours ago












  • @sztruks... My question was honest, and haven't herd about metapost... Thanks for the info... (ConTeXt is also something I have no idea about and will check it soon). Thanks
    – koleygr
    5 hours ago






  • 2




    @koleygr. No problem, those great tools are not as known as they could be. And my first comment was definatly too rude, apologize.
    – sztruks
    5 hours ago












  • @sztruks.. Just show the edit in your comment... I didn't found rude your first comment... Really.. Not at all.. It was a useful comment for me, and just noticed there that I had asked about "LaTeX related" and not "TeX related" as had too by mistake. But your comment was not rude at all, but a nice comment with enough information I needed to know about.
    – koleygr
    2 hours ago















up vote
2
down vote

favorite












I draw the following graph in Metapost. How to make the vertices of the subgraph with red edges not connect to arrows. The graph I obtained is
enter image description here



I want the vertices looks like the following picture (there is small space between a vertex and the arrows connnected to it). Thank you very much.



enter image description here



beginfig(1) ;
pair A,L,R,N,q;
path p;

A[1] := (0,2cm);

for i=2 upto 5:
A[i] := A[i-1] rotated -360/5;
endfor;

label.top(btex 1 etex, A[1]);
label.rt(btex 2 etex, A[2]);
label.bot(btex 3 etex, A[3]);
label.bot(btex 4 etex, A[4]);
label.lft(btex 5 etex, A[5]);


for i=1 upto 5:
q[i]:=A[i] rotated -36;
endfor;

q[6]:=0.5[A[1], A[4]];

for i=1 upto 6:
draw q[i] withpen pencircle scaled 2bp;
endfor;


for i=1 upto 5:
draw A[i] withpen pencircle scaled 2bp;
endfor;

N[1]:=0.5[A[1],A[4]];
N[2]:=1.5[A[5],N[1]];
N[3]:=0.5[A[5],N[1]];

p[1]:=A[1]..N[2]..A[4];
p[2]:=A[4]..N[3]..A[1];

draw p[1];
draw p[2];

drawarrow subpath(0,1) of p[1];
drawarrow subpath(0,0.2) of p[1];
drawarrow subpath(0,1.8) of p[1];

drawarrow subpath(0,1) of p[2];
drawarrow subpath(0,0.2) of p[2];
drawarrow subpath(0,1.8) of p[2];

N[1]:=0.5[A[2],A[5]];
N[2]:=0.5[A[1],N[1]];

p[3]:=A[2]..N[2]..A[5];


draw p[3];

drawarrow subpath(0,1.3) of p[3];
drawarrow subpath(0,0.5) of p[3];
drawarrow subpath(0,1.8) of p[3];

N[1]:=0.5[A[5],A[3]];
N[2]:=0.5[A[4],N[1]];

p[4]:=A[5]..N[2]..A[3];


draw p[4];

drawarrow subpath(0,0.8) of p[4];
drawarrow subpath(0,0.3) of p[4];
drawarrow subpath(0,1.8) of p[4];

p[5]:=A[3]..A[2];


draw p[5];
drawarrow subpath(0,0.5) of p[5];


drawarrow q[2]..A[2]..q[1] withcolor red;
drawarrow q[5]..A[1]..q[1] withcolor red;
drawarrow q[5]..A[5]..q[4] withcolor red;
drawarrow q[3]..A[4]..q[4] withcolor red;
drawarrow q[3]..A[3]..q[2] withcolor red;


drawarrow q[1].. p[1] intersectionpoint p[3] ..q[6] withcolor red;
drawarrow q[6].. p[3] intersectionpoint p[2] ..q[5] withcolor red;
drawarrow q[4].. p[4] intersectionpoint p[2] ..q[6] withcolor red;
drawarrow q[6].. p[4] intersectionpoint p[1] ..q[3] withcolor red;


endfig;

end









share|improve this question
























  • Just an honest question to the upvoters? Is this latex related (in order of this site) or there is a better forum to ask this question?
    – koleygr
    5 hours ago








  • 1




    @koleygr METAPOST is part of TeX systems, shipped with texlive and friends. Btw this is TeX S.E., not LaTeX S.E. There also plain TeX users, ConTeXt users and more here.
    – sztruks
    5 hours ago












  • @sztruks... My question was honest, and haven't herd about metapost... Thanks for the info... (ConTeXt is also something I have no idea about and will check it soon). Thanks
    – koleygr
    5 hours ago






  • 2




    @koleygr. No problem, those great tools are not as known as they could be. And my first comment was definatly too rude, apologize.
    – sztruks
    5 hours ago












  • @sztruks.. Just show the edit in your comment... I didn't found rude your first comment... Really.. Not at all.. It was a useful comment for me, and just noticed there that I had asked about "LaTeX related" and not "TeX related" as had too by mistake. But your comment was not rude at all, but a nice comment with enough information I needed to know about.
    – koleygr
    2 hours ago













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I draw the following graph in Metapost. How to make the vertices of the subgraph with red edges not connect to arrows. The graph I obtained is
enter image description here



I want the vertices looks like the following picture (there is small space between a vertex and the arrows connnected to it). Thank you very much.



enter image description here



beginfig(1) ;
pair A,L,R,N,q;
path p;

A[1] := (0,2cm);

for i=2 upto 5:
A[i] := A[i-1] rotated -360/5;
endfor;

label.top(btex 1 etex, A[1]);
label.rt(btex 2 etex, A[2]);
label.bot(btex 3 etex, A[3]);
label.bot(btex 4 etex, A[4]);
label.lft(btex 5 etex, A[5]);


for i=1 upto 5:
q[i]:=A[i] rotated -36;
endfor;

q[6]:=0.5[A[1], A[4]];

for i=1 upto 6:
draw q[i] withpen pencircle scaled 2bp;
endfor;


for i=1 upto 5:
draw A[i] withpen pencircle scaled 2bp;
endfor;

N[1]:=0.5[A[1],A[4]];
N[2]:=1.5[A[5],N[1]];
N[3]:=0.5[A[5],N[1]];

p[1]:=A[1]..N[2]..A[4];
p[2]:=A[4]..N[3]..A[1];

draw p[1];
draw p[2];

drawarrow subpath(0,1) of p[1];
drawarrow subpath(0,0.2) of p[1];
drawarrow subpath(0,1.8) of p[1];

drawarrow subpath(0,1) of p[2];
drawarrow subpath(0,0.2) of p[2];
drawarrow subpath(0,1.8) of p[2];

N[1]:=0.5[A[2],A[5]];
N[2]:=0.5[A[1],N[1]];

p[3]:=A[2]..N[2]..A[5];


draw p[3];

drawarrow subpath(0,1.3) of p[3];
drawarrow subpath(0,0.5) of p[3];
drawarrow subpath(0,1.8) of p[3];

N[1]:=0.5[A[5],A[3]];
N[2]:=0.5[A[4],N[1]];

p[4]:=A[5]..N[2]..A[3];


draw p[4];

drawarrow subpath(0,0.8) of p[4];
drawarrow subpath(0,0.3) of p[4];
drawarrow subpath(0,1.8) of p[4];

p[5]:=A[3]..A[2];


draw p[5];
drawarrow subpath(0,0.5) of p[5];


drawarrow q[2]..A[2]..q[1] withcolor red;
drawarrow q[5]..A[1]..q[1] withcolor red;
drawarrow q[5]..A[5]..q[4] withcolor red;
drawarrow q[3]..A[4]..q[4] withcolor red;
drawarrow q[3]..A[3]..q[2] withcolor red;


drawarrow q[1].. p[1] intersectionpoint p[3] ..q[6] withcolor red;
drawarrow q[6].. p[3] intersectionpoint p[2] ..q[5] withcolor red;
drawarrow q[4].. p[4] intersectionpoint p[2] ..q[6] withcolor red;
drawarrow q[6].. p[4] intersectionpoint p[1] ..q[3] withcolor red;


endfig;

end









share|improve this question















I draw the following graph in Metapost. How to make the vertices of the subgraph with red edges not connect to arrows. The graph I obtained is
enter image description here



I want the vertices looks like the following picture (there is small space between a vertex and the arrows connnected to it). Thank you very much.



enter image description here



beginfig(1) ;
pair A,L,R,N,q;
path p;

A[1] := (0,2cm);

for i=2 upto 5:
A[i] := A[i-1] rotated -360/5;
endfor;

label.top(btex 1 etex, A[1]);
label.rt(btex 2 etex, A[2]);
label.bot(btex 3 etex, A[3]);
label.bot(btex 4 etex, A[4]);
label.lft(btex 5 etex, A[5]);


for i=1 upto 5:
q[i]:=A[i] rotated -36;
endfor;

q[6]:=0.5[A[1], A[4]];

for i=1 upto 6:
draw q[i] withpen pencircle scaled 2bp;
endfor;


for i=1 upto 5:
draw A[i] withpen pencircle scaled 2bp;
endfor;

N[1]:=0.5[A[1],A[4]];
N[2]:=1.5[A[5],N[1]];
N[3]:=0.5[A[5],N[1]];

p[1]:=A[1]..N[2]..A[4];
p[2]:=A[4]..N[3]..A[1];

draw p[1];
draw p[2];

drawarrow subpath(0,1) of p[1];
drawarrow subpath(0,0.2) of p[1];
drawarrow subpath(0,1.8) of p[1];

drawarrow subpath(0,1) of p[2];
drawarrow subpath(0,0.2) of p[2];
drawarrow subpath(0,1.8) of p[2];

N[1]:=0.5[A[2],A[5]];
N[2]:=0.5[A[1],N[1]];

p[3]:=A[2]..N[2]..A[5];


draw p[3];

drawarrow subpath(0,1.3) of p[3];
drawarrow subpath(0,0.5) of p[3];
drawarrow subpath(0,1.8) of p[3];

N[1]:=0.5[A[5],A[3]];
N[2]:=0.5[A[4],N[1]];

p[4]:=A[5]..N[2]..A[3];


draw p[4];

drawarrow subpath(0,0.8) of p[4];
drawarrow subpath(0,0.3) of p[4];
drawarrow subpath(0,1.8) of p[4];

p[5]:=A[3]..A[2];


draw p[5];
drawarrow subpath(0,0.5) of p[5];


drawarrow q[2]..A[2]..q[1] withcolor red;
drawarrow q[5]..A[1]..q[1] withcolor red;
drawarrow q[5]..A[5]..q[4] withcolor red;
drawarrow q[3]..A[4]..q[4] withcolor red;
drawarrow q[3]..A[3]..q[2] withcolor red;


drawarrow q[1].. p[1] intersectionpoint p[3] ..q[6] withcolor red;
drawarrow q[6].. p[3] intersectionpoint p[2] ..q[5] withcolor red;
drawarrow q[4].. p[4] intersectionpoint p[2] ..q[6] withcolor red;
drawarrow q[6].. p[4] intersectionpoint p[1] ..q[3] withcolor red;


endfig;

end






metapost






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago









sztruks

1,174716




1,174716










asked 6 hours ago









Jianrong Li

1405




1405












  • Just an honest question to the upvoters? Is this latex related (in order of this site) or there is a better forum to ask this question?
    – koleygr
    5 hours ago








  • 1




    @koleygr METAPOST is part of TeX systems, shipped with texlive and friends. Btw this is TeX S.E., not LaTeX S.E. There also plain TeX users, ConTeXt users and more here.
    – sztruks
    5 hours ago












  • @sztruks... My question was honest, and haven't herd about metapost... Thanks for the info... (ConTeXt is also something I have no idea about and will check it soon). Thanks
    – koleygr
    5 hours ago






  • 2




    @koleygr. No problem, those great tools are not as known as they could be. And my first comment was definatly too rude, apologize.
    – sztruks
    5 hours ago












  • @sztruks.. Just show the edit in your comment... I didn't found rude your first comment... Really.. Not at all.. It was a useful comment for me, and just noticed there that I had asked about "LaTeX related" and not "TeX related" as had too by mistake. But your comment was not rude at all, but a nice comment with enough information I needed to know about.
    – koleygr
    2 hours ago


















  • Just an honest question to the upvoters? Is this latex related (in order of this site) or there is a better forum to ask this question?
    – koleygr
    5 hours ago








  • 1




    @koleygr METAPOST is part of TeX systems, shipped with texlive and friends. Btw this is TeX S.E., not LaTeX S.E. There also plain TeX users, ConTeXt users and more here.
    – sztruks
    5 hours ago












  • @sztruks... My question was honest, and haven't herd about metapost... Thanks for the info... (ConTeXt is also something I have no idea about and will check it soon). Thanks
    – koleygr
    5 hours ago






  • 2




    @koleygr. No problem, those great tools are not as known as they could be. And my first comment was definatly too rude, apologize.
    – sztruks
    5 hours ago












  • @sztruks.. Just show the edit in your comment... I didn't found rude your first comment... Really.. Not at all.. It was a useful comment for me, and just noticed there that I had asked about "LaTeX related" and not "TeX related" as had too by mistake. But your comment was not rude at all, but a nice comment with enough information I needed to know about.
    – koleygr
    2 hours ago
















Just an honest question to the upvoters? Is this latex related (in order of this site) or there is a better forum to ask this question?
– koleygr
5 hours ago






Just an honest question to the upvoters? Is this latex related (in order of this site) or there is a better forum to ask this question?
– koleygr
5 hours ago






1




1




@koleygr METAPOST is part of TeX systems, shipped with texlive and friends. Btw this is TeX S.E., not LaTeX S.E. There also plain TeX users, ConTeXt users and more here.
– sztruks
5 hours ago






@koleygr METAPOST is part of TeX systems, shipped with texlive and friends. Btw this is TeX S.E., not LaTeX S.E. There also plain TeX users, ConTeXt users and more here.
– sztruks
5 hours ago














@sztruks... My question was honest, and haven't herd about metapost... Thanks for the info... (ConTeXt is also something I have no idea about and will check it soon). Thanks
– koleygr
5 hours ago




@sztruks... My question was honest, and haven't herd about metapost... Thanks for the info... (ConTeXt is also something I have no idea about and will check it soon). Thanks
– koleygr
5 hours ago




2




2




@koleygr. No problem, those great tools are not as known as they could be. And my first comment was definatly too rude, apologize.
– sztruks
5 hours ago






@koleygr. No problem, those great tools are not as known as they could be. And my first comment was definatly too rude, apologize.
– sztruks
5 hours ago














@sztruks.. Just show the edit in your comment... I didn't found rude your first comment... Really.. Not at all.. It was a useful comment for me, and just noticed there that I had asked about "LaTeX related" and not "TeX related" as had too by mistake. But your comment was not rude at all, but a nice comment with enough information I needed to know about.
– koleygr
2 hours ago




@sztruks.. Just show the edit in your comment... I didn't found rude your first comment... Really.. Not at all.. It was a useful comment for me, and just noticed there that I had asked about "LaTeX related" and not "TeX related" as had too by mistake. But your comment was not rude at all, but a nice comment with enough information I needed to know about.
– koleygr
2 hours ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Here is an answer : I designed circles around your vertices and used cutbefore and cutafter primitives



beginfig(1) ;
pair A,L,R,N,q;
path p;

A[1] := (0,2cm);

for i=2 upto 5:
A[i] := A[i-1] rotated -360/5;
endfor;

label.top(btex 1 etex, A[1]);
label.rt(btex 2 etex, A[2]);
label.bot(btex 3 etex, A[3]);
label.bot(btex 4 etex, A[4]);
label.lft(btex 5 etex, A[5]);


for i=1 upto 5:
q[i]:=A[i] rotated -36;
endfor;

q[6]:=0.5[A[1], A[4]];

for i=1 upto 6:
draw q[i] withpen pencircle scaled 2bp;
endfor;

for i=1 upto 5:
draw A[i] withpen pencircle scaled 2bp;
endfor;

N[1]:=0.5[A[1],A[4]];
N[2]:=1.5[A[5],N[1]];
N[3]:=0.5[A[5],N[1]];

p[1]:=A[1]..N[2]..A[4];
p[2]:=A[4]..N[3]..A[1];

draw p[1];
draw p[2];

drawarrow subpath(0,1) of p[1];
drawarrow subpath(0,0.2) of p[1];
drawarrow subpath(0,1.8) of p[1];

drawarrow subpath(0,1) of p[2];
drawarrow subpath(0,0.2) of p[2];
drawarrow subpath(0,1.8) of p[2];

N[1]:=0.5[A[2],A[5]];
N[2]:=0.5[A[1],N[1]];

p[3]:=A[2]..N[2]..A[5];

draw p[3];

drawarrow subpath(0,1.3) of p[3];
drawarrow subpath(0,0.5) of p[3];
drawarrow subpath(0,1.8) of p[3];

N[1]:=0.5[A[5],A[3]];
N[2]:=0.5[A[4],N[1]];

p[4]:=A[5]..N[2]..A[3];


draw p[4];

drawarrow subpath(0,0.8) of p[4];
drawarrow subpath(0,0.3) of p[4];
drawarrow subpath(0,1.8) of p[4];

p[5]:=A[3]..A[2];

draw p[5];
drawarrow subpath(0,0.5) of p[5];

%circles that will create buffers around your vertice
path c;
for i=1 upto 6 :
c[i]:= fullcircle scaled 4bp shifted q[i] ;
endfor

path r;
r[1]:= q[2]..A[2]..q[1] ;
r[2]:= q[5]..A[1]..q[1] ;
r[3]:= q[5]..A[5]..q[4] ;
r[4]:= q[3]..A[4]..q[4] ;
r[5]:= q[3]..A[3]..q[2] ;
r[6]:= q[1].. p[1] intersectionpoint p[3] ..q[6] ;
r[7]:= q[6].. p[3] intersectionpoint p[2] ..q[5] ;
r[8]:= q[4].. p[4] intersectionpoint p[2] ..q[6] ;
r[9]:= q[6].. p[4] intersectionpoint p[1] ..q[3] ;

%cutafter and cutbefore cut path before and after a pair
drawarrow (r[1] cutbefore c[2] cutafter c[1]) withcolor red;
drawarrow (r[2] cutbefore c[5] cutafter c[1]) withcolor red;
drawarrow (r[3] cutbefore c[5] cutafter c[4]) withcolor red;
drawarrow (r[4] cutbefore c[3] cutafter c[4]) withcolor red;
drawarrow (r[5] cutbefore c[3] cutafter c[2]) withcolor red;
drawarrow (r[6] cutbefore c[1] cutafter c[6]) withcolor red;
drawarrow (r[7] cutbefore c[6] cutafter c[5]) withcolor red;
drawarrow (r[8] cutbefore c[4] cutafter c[6]) withcolor red;
drawarrow (r[9] cutbefore c[6] cutafter c[3]) withcolor red;

endfig ;

end


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',
    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%2f459602%2fhow-to-make-the-vertices-not-connect-to-arrows%23new-answer', 'question_page');
    }
    );

    Post as a guest
































    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    Here is an answer : I designed circles around your vertices and used cutbefore and cutafter primitives



    beginfig(1) ;
    pair A,L,R,N,q;
    path p;

    A[1] := (0,2cm);

    for i=2 upto 5:
    A[i] := A[i-1] rotated -360/5;
    endfor;

    label.top(btex 1 etex, A[1]);
    label.rt(btex 2 etex, A[2]);
    label.bot(btex 3 etex, A[3]);
    label.bot(btex 4 etex, A[4]);
    label.lft(btex 5 etex, A[5]);


    for i=1 upto 5:
    q[i]:=A[i] rotated -36;
    endfor;

    q[6]:=0.5[A[1], A[4]];

    for i=1 upto 6:
    draw q[i] withpen pencircle scaled 2bp;
    endfor;

    for i=1 upto 5:
    draw A[i] withpen pencircle scaled 2bp;
    endfor;

    N[1]:=0.5[A[1],A[4]];
    N[2]:=1.5[A[5],N[1]];
    N[3]:=0.5[A[5],N[1]];

    p[1]:=A[1]..N[2]..A[4];
    p[2]:=A[4]..N[3]..A[1];

    draw p[1];
    draw p[2];

    drawarrow subpath(0,1) of p[1];
    drawarrow subpath(0,0.2) of p[1];
    drawarrow subpath(0,1.8) of p[1];

    drawarrow subpath(0,1) of p[2];
    drawarrow subpath(0,0.2) of p[2];
    drawarrow subpath(0,1.8) of p[2];

    N[1]:=0.5[A[2],A[5]];
    N[2]:=0.5[A[1],N[1]];

    p[3]:=A[2]..N[2]..A[5];

    draw p[3];

    drawarrow subpath(0,1.3) of p[3];
    drawarrow subpath(0,0.5) of p[3];
    drawarrow subpath(0,1.8) of p[3];

    N[1]:=0.5[A[5],A[3]];
    N[2]:=0.5[A[4],N[1]];

    p[4]:=A[5]..N[2]..A[3];


    draw p[4];

    drawarrow subpath(0,0.8) of p[4];
    drawarrow subpath(0,0.3) of p[4];
    drawarrow subpath(0,1.8) of p[4];

    p[5]:=A[3]..A[2];

    draw p[5];
    drawarrow subpath(0,0.5) of p[5];

    %circles that will create buffers around your vertice
    path c;
    for i=1 upto 6 :
    c[i]:= fullcircle scaled 4bp shifted q[i] ;
    endfor

    path r;
    r[1]:= q[2]..A[2]..q[1] ;
    r[2]:= q[5]..A[1]..q[1] ;
    r[3]:= q[5]..A[5]..q[4] ;
    r[4]:= q[3]..A[4]..q[4] ;
    r[5]:= q[3]..A[3]..q[2] ;
    r[6]:= q[1].. p[1] intersectionpoint p[3] ..q[6] ;
    r[7]:= q[6].. p[3] intersectionpoint p[2] ..q[5] ;
    r[8]:= q[4].. p[4] intersectionpoint p[2] ..q[6] ;
    r[9]:= q[6].. p[4] intersectionpoint p[1] ..q[3] ;

    %cutafter and cutbefore cut path before and after a pair
    drawarrow (r[1] cutbefore c[2] cutafter c[1]) withcolor red;
    drawarrow (r[2] cutbefore c[5] cutafter c[1]) withcolor red;
    drawarrow (r[3] cutbefore c[5] cutafter c[4]) withcolor red;
    drawarrow (r[4] cutbefore c[3] cutafter c[4]) withcolor red;
    drawarrow (r[5] cutbefore c[3] cutafter c[2]) withcolor red;
    drawarrow (r[6] cutbefore c[1] cutafter c[6]) withcolor red;
    drawarrow (r[7] cutbefore c[6] cutafter c[5]) withcolor red;
    drawarrow (r[8] cutbefore c[4] cutafter c[6]) withcolor red;
    drawarrow (r[9] cutbefore c[6] cutafter c[3]) withcolor red;

    endfig ;

    end


    enter image description here






    share|improve this answer



























      up vote
      3
      down vote



      accepted










      Here is an answer : I designed circles around your vertices and used cutbefore and cutafter primitives



      beginfig(1) ;
      pair A,L,R,N,q;
      path p;

      A[1] := (0,2cm);

      for i=2 upto 5:
      A[i] := A[i-1] rotated -360/5;
      endfor;

      label.top(btex 1 etex, A[1]);
      label.rt(btex 2 etex, A[2]);
      label.bot(btex 3 etex, A[3]);
      label.bot(btex 4 etex, A[4]);
      label.lft(btex 5 etex, A[5]);


      for i=1 upto 5:
      q[i]:=A[i] rotated -36;
      endfor;

      q[6]:=0.5[A[1], A[4]];

      for i=1 upto 6:
      draw q[i] withpen pencircle scaled 2bp;
      endfor;

      for i=1 upto 5:
      draw A[i] withpen pencircle scaled 2bp;
      endfor;

      N[1]:=0.5[A[1],A[4]];
      N[2]:=1.5[A[5],N[1]];
      N[3]:=0.5[A[5],N[1]];

      p[1]:=A[1]..N[2]..A[4];
      p[2]:=A[4]..N[3]..A[1];

      draw p[1];
      draw p[2];

      drawarrow subpath(0,1) of p[1];
      drawarrow subpath(0,0.2) of p[1];
      drawarrow subpath(0,1.8) of p[1];

      drawarrow subpath(0,1) of p[2];
      drawarrow subpath(0,0.2) of p[2];
      drawarrow subpath(0,1.8) of p[2];

      N[1]:=0.5[A[2],A[5]];
      N[2]:=0.5[A[1],N[1]];

      p[3]:=A[2]..N[2]..A[5];

      draw p[3];

      drawarrow subpath(0,1.3) of p[3];
      drawarrow subpath(0,0.5) of p[3];
      drawarrow subpath(0,1.8) of p[3];

      N[1]:=0.5[A[5],A[3]];
      N[2]:=0.5[A[4],N[1]];

      p[4]:=A[5]..N[2]..A[3];


      draw p[4];

      drawarrow subpath(0,0.8) of p[4];
      drawarrow subpath(0,0.3) of p[4];
      drawarrow subpath(0,1.8) of p[4];

      p[5]:=A[3]..A[2];

      draw p[5];
      drawarrow subpath(0,0.5) of p[5];

      %circles that will create buffers around your vertice
      path c;
      for i=1 upto 6 :
      c[i]:= fullcircle scaled 4bp shifted q[i] ;
      endfor

      path r;
      r[1]:= q[2]..A[2]..q[1] ;
      r[2]:= q[5]..A[1]..q[1] ;
      r[3]:= q[5]..A[5]..q[4] ;
      r[4]:= q[3]..A[4]..q[4] ;
      r[5]:= q[3]..A[3]..q[2] ;
      r[6]:= q[1].. p[1] intersectionpoint p[3] ..q[6] ;
      r[7]:= q[6].. p[3] intersectionpoint p[2] ..q[5] ;
      r[8]:= q[4].. p[4] intersectionpoint p[2] ..q[6] ;
      r[9]:= q[6].. p[4] intersectionpoint p[1] ..q[3] ;

      %cutafter and cutbefore cut path before and after a pair
      drawarrow (r[1] cutbefore c[2] cutafter c[1]) withcolor red;
      drawarrow (r[2] cutbefore c[5] cutafter c[1]) withcolor red;
      drawarrow (r[3] cutbefore c[5] cutafter c[4]) withcolor red;
      drawarrow (r[4] cutbefore c[3] cutafter c[4]) withcolor red;
      drawarrow (r[5] cutbefore c[3] cutafter c[2]) withcolor red;
      drawarrow (r[6] cutbefore c[1] cutafter c[6]) withcolor red;
      drawarrow (r[7] cutbefore c[6] cutafter c[5]) withcolor red;
      drawarrow (r[8] cutbefore c[4] cutafter c[6]) withcolor red;
      drawarrow (r[9] cutbefore c[6] cutafter c[3]) withcolor red;

      endfig ;

      end


      enter image description here






      share|improve this answer

























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        Here is an answer : I designed circles around your vertices and used cutbefore and cutafter primitives



        beginfig(1) ;
        pair A,L,R,N,q;
        path p;

        A[1] := (0,2cm);

        for i=2 upto 5:
        A[i] := A[i-1] rotated -360/5;
        endfor;

        label.top(btex 1 etex, A[1]);
        label.rt(btex 2 etex, A[2]);
        label.bot(btex 3 etex, A[3]);
        label.bot(btex 4 etex, A[4]);
        label.lft(btex 5 etex, A[5]);


        for i=1 upto 5:
        q[i]:=A[i] rotated -36;
        endfor;

        q[6]:=0.5[A[1], A[4]];

        for i=1 upto 6:
        draw q[i] withpen pencircle scaled 2bp;
        endfor;

        for i=1 upto 5:
        draw A[i] withpen pencircle scaled 2bp;
        endfor;

        N[1]:=0.5[A[1],A[4]];
        N[2]:=1.5[A[5],N[1]];
        N[3]:=0.5[A[5],N[1]];

        p[1]:=A[1]..N[2]..A[4];
        p[2]:=A[4]..N[3]..A[1];

        draw p[1];
        draw p[2];

        drawarrow subpath(0,1) of p[1];
        drawarrow subpath(0,0.2) of p[1];
        drawarrow subpath(0,1.8) of p[1];

        drawarrow subpath(0,1) of p[2];
        drawarrow subpath(0,0.2) of p[2];
        drawarrow subpath(0,1.8) of p[2];

        N[1]:=0.5[A[2],A[5]];
        N[2]:=0.5[A[1],N[1]];

        p[3]:=A[2]..N[2]..A[5];

        draw p[3];

        drawarrow subpath(0,1.3) of p[3];
        drawarrow subpath(0,0.5) of p[3];
        drawarrow subpath(0,1.8) of p[3];

        N[1]:=0.5[A[5],A[3]];
        N[2]:=0.5[A[4],N[1]];

        p[4]:=A[5]..N[2]..A[3];


        draw p[4];

        drawarrow subpath(0,0.8) of p[4];
        drawarrow subpath(0,0.3) of p[4];
        drawarrow subpath(0,1.8) of p[4];

        p[5]:=A[3]..A[2];

        draw p[5];
        drawarrow subpath(0,0.5) of p[5];

        %circles that will create buffers around your vertice
        path c;
        for i=1 upto 6 :
        c[i]:= fullcircle scaled 4bp shifted q[i] ;
        endfor

        path r;
        r[1]:= q[2]..A[2]..q[1] ;
        r[2]:= q[5]..A[1]..q[1] ;
        r[3]:= q[5]..A[5]..q[4] ;
        r[4]:= q[3]..A[4]..q[4] ;
        r[5]:= q[3]..A[3]..q[2] ;
        r[6]:= q[1].. p[1] intersectionpoint p[3] ..q[6] ;
        r[7]:= q[6].. p[3] intersectionpoint p[2] ..q[5] ;
        r[8]:= q[4].. p[4] intersectionpoint p[2] ..q[6] ;
        r[9]:= q[6].. p[4] intersectionpoint p[1] ..q[3] ;

        %cutafter and cutbefore cut path before and after a pair
        drawarrow (r[1] cutbefore c[2] cutafter c[1]) withcolor red;
        drawarrow (r[2] cutbefore c[5] cutafter c[1]) withcolor red;
        drawarrow (r[3] cutbefore c[5] cutafter c[4]) withcolor red;
        drawarrow (r[4] cutbefore c[3] cutafter c[4]) withcolor red;
        drawarrow (r[5] cutbefore c[3] cutafter c[2]) withcolor red;
        drawarrow (r[6] cutbefore c[1] cutafter c[6]) withcolor red;
        drawarrow (r[7] cutbefore c[6] cutafter c[5]) withcolor red;
        drawarrow (r[8] cutbefore c[4] cutafter c[6]) withcolor red;
        drawarrow (r[9] cutbefore c[6] cutafter c[3]) withcolor red;

        endfig ;

        end


        enter image description here






        share|improve this answer














        Here is an answer : I designed circles around your vertices and used cutbefore and cutafter primitives



        beginfig(1) ;
        pair A,L,R,N,q;
        path p;

        A[1] := (0,2cm);

        for i=2 upto 5:
        A[i] := A[i-1] rotated -360/5;
        endfor;

        label.top(btex 1 etex, A[1]);
        label.rt(btex 2 etex, A[2]);
        label.bot(btex 3 etex, A[3]);
        label.bot(btex 4 etex, A[4]);
        label.lft(btex 5 etex, A[5]);


        for i=1 upto 5:
        q[i]:=A[i] rotated -36;
        endfor;

        q[6]:=0.5[A[1], A[4]];

        for i=1 upto 6:
        draw q[i] withpen pencircle scaled 2bp;
        endfor;

        for i=1 upto 5:
        draw A[i] withpen pencircle scaled 2bp;
        endfor;

        N[1]:=0.5[A[1],A[4]];
        N[2]:=1.5[A[5],N[1]];
        N[3]:=0.5[A[5],N[1]];

        p[1]:=A[1]..N[2]..A[4];
        p[2]:=A[4]..N[3]..A[1];

        draw p[1];
        draw p[2];

        drawarrow subpath(0,1) of p[1];
        drawarrow subpath(0,0.2) of p[1];
        drawarrow subpath(0,1.8) of p[1];

        drawarrow subpath(0,1) of p[2];
        drawarrow subpath(0,0.2) of p[2];
        drawarrow subpath(0,1.8) of p[2];

        N[1]:=0.5[A[2],A[5]];
        N[2]:=0.5[A[1],N[1]];

        p[3]:=A[2]..N[2]..A[5];

        draw p[3];

        drawarrow subpath(0,1.3) of p[3];
        drawarrow subpath(0,0.5) of p[3];
        drawarrow subpath(0,1.8) of p[3];

        N[1]:=0.5[A[5],A[3]];
        N[2]:=0.5[A[4],N[1]];

        p[4]:=A[5]..N[2]..A[3];


        draw p[4];

        drawarrow subpath(0,0.8) of p[4];
        drawarrow subpath(0,0.3) of p[4];
        drawarrow subpath(0,1.8) of p[4];

        p[5]:=A[3]..A[2];

        draw p[5];
        drawarrow subpath(0,0.5) of p[5];

        %circles that will create buffers around your vertice
        path c;
        for i=1 upto 6 :
        c[i]:= fullcircle scaled 4bp shifted q[i] ;
        endfor

        path r;
        r[1]:= q[2]..A[2]..q[1] ;
        r[2]:= q[5]..A[1]..q[1] ;
        r[3]:= q[5]..A[5]..q[4] ;
        r[4]:= q[3]..A[4]..q[4] ;
        r[5]:= q[3]..A[3]..q[2] ;
        r[6]:= q[1].. p[1] intersectionpoint p[3] ..q[6] ;
        r[7]:= q[6].. p[3] intersectionpoint p[2] ..q[5] ;
        r[8]:= q[4].. p[4] intersectionpoint p[2] ..q[6] ;
        r[9]:= q[6].. p[4] intersectionpoint p[1] ..q[3] ;

        %cutafter and cutbefore cut path before and after a pair
        drawarrow (r[1] cutbefore c[2] cutafter c[1]) withcolor red;
        drawarrow (r[2] cutbefore c[5] cutafter c[1]) withcolor red;
        drawarrow (r[3] cutbefore c[5] cutafter c[4]) withcolor red;
        drawarrow (r[4] cutbefore c[3] cutafter c[4]) withcolor red;
        drawarrow (r[5] cutbefore c[3] cutafter c[2]) withcolor red;
        drawarrow (r[6] cutbefore c[1] cutafter c[6]) withcolor red;
        drawarrow (r[7] cutbefore c[6] cutafter c[5]) withcolor red;
        drawarrow (r[8] cutbefore c[4] cutafter c[6]) withcolor red;
        drawarrow (r[9] cutbefore c[6] cutafter c[3]) withcolor red;

        endfig ;

        end


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 hours ago

























        answered 2 hours ago









        sztruks

        1,174716




        1,174716






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459602%2fhow-to-make-the-vertices-not-connect-to-arrows%23new-answer', 'question_page');
            }
            );

            Post as a guest




















































































            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

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