Naming nodes in a decoration and draw lines from node to node











up vote
2
down vote

favorite












thanks for taking the time.
I have the problem, that I want to get normal vectors on a smooth plot, furthermore I have lines intersecting said plot, but they also need to end in the graph. My approach so far is using the decorations for the normal vectors. I need to create the next normal vector at the intersection of $A$ with the boundary, and I'd like to cut $A$ short at exactly the intersection.



  begin{tikzpicture}[
decoration={
markings,
mark=at position 0.4 with {draw[->] (0,0)--(0,1);},
mark=at position 0.4 with {draw[->] (0,0)--(2,-2) node[below]{A};},
mark=at position 0.4 with {draw[<-] (0,0)--(-.8,-.8);}
}
]
draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
end{tikzpicture}


I hope my problem has a solution.
Thanks in advance.
Fabian










share|improve this question







New contributor




Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    2
    down vote

    favorite












    thanks for taking the time.
    I have the problem, that I want to get normal vectors on a smooth plot, furthermore I have lines intersecting said plot, but they also need to end in the graph. My approach so far is using the decorations for the normal vectors. I need to create the next normal vector at the intersection of $A$ with the boundary, and I'd like to cut $A$ short at exactly the intersection.



      begin{tikzpicture}[
    decoration={
    markings,
    mark=at position 0.4 with {draw[->] (0,0)--(0,1);},
    mark=at position 0.4 with {draw[->] (0,0)--(2,-2) node[below]{A};},
    mark=at position 0.4 with {draw[<-] (0,0)--(-.8,-.8);}
    }
    ]
    draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
    end{tikzpicture}


    I hope my problem has a solution.
    Thanks in advance.
    Fabian










    share|improve this question







    New contributor




    Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      thanks for taking the time.
      I have the problem, that I want to get normal vectors on a smooth plot, furthermore I have lines intersecting said plot, but they also need to end in the graph. My approach so far is using the decorations for the normal vectors. I need to create the next normal vector at the intersection of $A$ with the boundary, and I'd like to cut $A$ short at exactly the intersection.



        begin{tikzpicture}[
      decoration={
      markings,
      mark=at position 0.4 with {draw[->] (0,0)--(0,1);},
      mark=at position 0.4 with {draw[->] (0,0)--(2,-2) node[below]{A};},
      mark=at position 0.4 with {draw[<-] (0,0)--(-.8,-.8);}
      }
      ]
      draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
      end{tikzpicture}


      I hope my problem has a solution.
      Thanks in advance.
      Fabian










      share|improve this question







      New contributor




      Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      thanks for taking the time.
      I have the problem, that I want to get normal vectors on a smooth plot, furthermore I have lines intersecting said plot, but they also need to end in the graph. My approach so far is using the decorations for the normal vectors. I need to create the next normal vector at the intersection of $A$ with the boundary, and I'd like to cut $A$ short at exactly the intersection.



        begin{tikzpicture}[
      decoration={
      markings,
      mark=at position 0.4 with {draw[->] (0,0)--(0,1);},
      mark=at position 0.4 with {draw[->] (0,0)--(2,-2) node[below]{A};},
      mark=at position 0.4 with {draw[<-] (0,0)--(-.8,-.8);}
      }
      ]
      draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
      end{tikzpicture}


      I hope my problem has a solution.
      Thanks in advance.
      Fabian







      tikz-pgf intersections






      share|improve this question







      New contributor




      Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      Fabian

      111




      111




      New contributor




      Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Fabian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          Welcome to TeX.SE! You can add arbitrarily many commands to one draw command.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)--(0,1);
          draw[->] (0,0)--(2,-2) node[below]{A};
          draw[<-] (0,0)--(-.8,-.8);}
          }
          ]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          end{tikzpicture}
          end{document}


          enter image description here



          What is more more, you can name the coordinates used in markings, and access it from outside.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)coordinate(X) --(0,1);},
          }]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          draw[-latex] (1.5,-1.5) -- (X);
          draw[-latex] (X) -- (2,2);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer





















          • That helped quite a bit. I have one follow up question though. How can i find out the position of the intersection in relation to the decoration to get a second normal vector going? My only choice at this moment is trying to see the right point. Thanks again.
            – Fabian
            20 hours ago










          • @Fabian I have trouble interpreting this follow-up question. at position 0.4 means at 40% of the total length of the path. Could you please try to reword it? (BTW, by the rules of this site, follow-up questions are to be asked in form of a new question. Asking questions is free, after all.)
            – marmot
            13 hours ago











          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
          });


          }
          });






          Fabian is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461118%2fnaming-nodes-in-a-decoration-and-draw-lines-from-node-to-node%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          Welcome to TeX.SE! You can add arbitrarily many commands to one draw command.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)--(0,1);
          draw[->] (0,0)--(2,-2) node[below]{A};
          draw[<-] (0,0)--(-.8,-.8);}
          }
          ]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          end{tikzpicture}
          end{document}


          enter image description here



          What is more more, you can name the coordinates used in markings, and access it from outside.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)coordinate(X) --(0,1);},
          }]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          draw[-latex] (1.5,-1.5) -- (X);
          draw[-latex] (X) -- (2,2);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer





















          • That helped quite a bit. I have one follow up question though. How can i find out the position of the intersection in relation to the decoration to get a second normal vector going? My only choice at this moment is trying to see the right point. Thanks again.
            – Fabian
            20 hours ago










          • @Fabian I have trouble interpreting this follow-up question. at position 0.4 means at 40% of the total length of the path. Could you please try to reword it? (BTW, by the rules of this site, follow-up questions are to be asked in form of a new question. Asking questions is free, after all.)
            – marmot
            13 hours ago















          up vote
          2
          down vote













          Welcome to TeX.SE! You can add arbitrarily many commands to one draw command.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)--(0,1);
          draw[->] (0,0)--(2,-2) node[below]{A};
          draw[<-] (0,0)--(-.8,-.8);}
          }
          ]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          end{tikzpicture}
          end{document}


          enter image description here



          What is more more, you can name the coordinates used in markings, and access it from outside.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)coordinate(X) --(0,1);},
          }]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          draw[-latex] (1.5,-1.5) -- (X);
          draw[-latex] (X) -- (2,2);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer





















          • That helped quite a bit. I have one follow up question though. How can i find out the position of the intersection in relation to the decoration to get a second normal vector going? My only choice at this moment is trying to see the right point. Thanks again.
            – Fabian
            20 hours ago










          • @Fabian I have trouble interpreting this follow-up question. at position 0.4 means at 40% of the total length of the path. Could you please try to reword it? (BTW, by the rules of this site, follow-up questions are to be asked in form of a new question. Asking questions is free, after all.)
            – marmot
            13 hours ago













          up vote
          2
          down vote










          up vote
          2
          down vote









          Welcome to TeX.SE! You can add arbitrarily many commands to one draw command.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)--(0,1);
          draw[->] (0,0)--(2,-2) node[below]{A};
          draw[<-] (0,0)--(-.8,-.8);}
          }
          ]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          end{tikzpicture}
          end{document}


          enter image description here



          What is more more, you can name the coordinates used in markings, and access it from outside.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)coordinate(X) --(0,1);},
          }]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          draw[-latex] (1.5,-1.5) -- (X);
          draw[-latex] (X) -- (2,2);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer












          Welcome to TeX.SE! You can add arbitrarily many commands to one draw command.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)--(0,1);
          draw[->] (0,0)--(2,-2) node[below]{A};
          draw[<-] (0,0)--(-.8,-.8);}
          }
          ]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          end{tikzpicture}
          end{document}


          enter image description here



          What is more more, you can name the coordinates used in markings, and access it from outside.



          documentclass[tikz,border=3.14mm]{standalone}
          usetikzlibrary{decorations.markings}
          begin{document}
          begin{tikzpicture}[
          decoration={
          markings,
          mark=at position 0.4 with {draw[->] (0,0)coordinate(X) --(0,1);},
          }]
          draw[postaction={decorate}] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
          draw[-latex] (1.5,-1.5) -- (X);
          draw[-latex] (X) -- (2,2);
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          marmot

          77.2k487162




          77.2k487162












          • That helped quite a bit. I have one follow up question though. How can i find out the position of the intersection in relation to the decoration to get a second normal vector going? My only choice at this moment is trying to see the right point. Thanks again.
            – Fabian
            20 hours ago










          • @Fabian I have trouble interpreting this follow-up question. at position 0.4 means at 40% of the total length of the path. Could you please try to reword it? (BTW, by the rules of this site, follow-up questions are to be asked in form of a new question. Asking questions is free, after all.)
            – marmot
            13 hours ago


















          • That helped quite a bit. I have one follow up question though. How can i find out the position of the intersection in relation to the decoration to get a second normal vector going? My only choice at this moment is trying to see the right point. Thanks again.
            – Fabian
            20 hours ago










          • @Fabian I have trouble interpreting this follow-up question. at position 0.4 means at 40% of the total length of the path. Could you please try to reword it? (BTW, by the rules of this site, follow-up questions are to be asked in form of a new question. Asking questions is free, after all.)
            – marmot
            13 hours ago
















          That helped quite a bit. I have one follow up question though. How can i find out the position of the intersection in relation to the decoration to get a second normal vector going? My only choice at this moment is trying to see the right point. Thanks again.
          – Fabian
          20 hours ago




          That helped quite a bit. I have one follow up question though. How can i find out the position of the intersection in relation to the decoration to get a second normal vector going? My only choice at this moment is trying to see the right point. Thanks again.
          – Fabian
          20 hours ago












          @Fabian I have trouble interpreting this follow-up question. at position 0.4 means at 40% of the total length of the path. Could you please try to reword it? (BTW, by the rules of this site, follow-up questions are to be asked in form of a new question. Asking questions is free, after all.)
          – marmot
          13 hours ago




          @Fabian I have trouble interpreting this follow-up question. at position 0.4 means at 40% of the total length of the path. Could you please try to reword it? (BTW, by the rules of this site, follow-up questions are to be asked in form of a new question. Asking questions is free, after all.)
          – marmot
          13 hours ago










          Fabian is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          Fabian is a new contributor. Be nice, and check out our Code of Conduct.













          Fabian is a new contributor. Be nice, and check out our Code of Conduct.












          Fabian is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461118%2fnaming-nodes-in-a-decoration-and-draw-lines-from-node-to-node%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          サソリ

          広島県道265号伴広島線

          Accessing regular linux commands in Huawei's Dopra Linux