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
tikz-pgf intersections
New contributor
add a comment |
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
tikz-pgf intersections
New contributor
add a comment |
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
tikz-pgf intersections
New contributor
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
tikz-pgf intersections
New contributor
New contributor
New contributor
asked yesterday
Fabian
111
111
New contributor
New contributor
add a comment |
add a comment |
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}
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}
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
add a comment |
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}
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}
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
add a comment |
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}
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}
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
add a comment |
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}
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}
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}
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}
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
add a comment |
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
add a comment |
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.
Fabian is a new contributor. Be nice, and check out our Code of Conduct.
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%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
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