Finding an intersection with respect to the decoration
up vote
3
down vote
favorite
in
Naming nodes in a decoration and draw lines from node to node
I asked a question, which was answered. The most help was the following.
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}
Now, being able to draw those lines and naming the point, the follow up question is:
Can I find the intersection of A with the smooth plot in relation to the smooth plot. I'd like the intersection in terms of pos=.3 or something, so can do a decoration at the intersection. Is it possible and how can it be done?
Thanks a lot.
Greetings
Fabian
tikz-pgf decorations intersections
New contributor
add a comment |
up vote
3
down vote
favorite
in
Naming nodes in a decoration and draw lines from node to node
I asked a question, which was answered. The most help was the following.
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}
Now, being able to draw those lines and naming the point, the follow up question is:
Can I find the intersection of A with the smooth plot in relation to the smooth plot. I'd like the intersection in terms of pos=.3 or something, so can do a decoration at the intersection. Is it possible and how can it be done?
Thanks a lot.
Greetings
Fabian
tikz-pgf decorations intersections
New contributor
A
is a node. What you mean by intersection ofA
with plot?
– nidhin
2 days ago
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
2 days ago
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
in
Naming nodes in a decoration and draw lines from node to node
I asked a question, which was answered. The most help was the following.
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}
Now, being able to draw those lines and naming the point, the follow up question is:
Can I find the intersection of A with the smooth plot in relation to the smooth plot. I'd like the intersection in terms of pos=.3 or something, so can do a decoration at the intersection. Is it possible and how can it be done?
Thanks a lot.
Greetings
Fabian
tikz-pgf decorations intersections
New contributor
in
Naming nodes in a decoration and draw lines from node to node
I asked a question, which was answered. The most help was the following.
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}
Now, being able to draw those lines and naming the point, the follow up question is:
Can I find the intersection of A with the smooth plot in relation to the smooth plot. I'd like the intersection in terms of pos=.3 or something, so can do a decoration at the intersection. Is it possible and how can it be done?
Thanks a lot.
Greetings
Fabian
tikz-pgf decorations intersections
tikz-pgf decorations intersections
New contributor
New contributor
edited 2 days ago
AndréC
6,24711140
6,24711140
New contributor
asked 2 days ago
Fabian
303
303
New contributor
New contributor
A
is a node. What you mean by intersection ofA
with plot?
– nidhin
2 days ago
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
2 days ago
add a comment |
A
is a node. What you mean by intersection ofA
with plot?
– nidhin
2 days ago
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
2 days ago
A
is a node. What you mean by intersection of A
with plot?– nidhin
2 days ago
A
is a node. What you mean by intersection of A
with plot?– nidhin
2 days ago
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
2 days ago
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
This question is actually less innocent than it might appear to you. Luckily pgfplots
(!) has its means to decompose a path into intersection segments, which, in turn, one can decorate. In this MWE
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepgfplotslibrary{fillbetween}
begin{document}
begin{tikzpicture}
draw[postaction={decorate,decoration={
markings,
mark=at position 0.4 with {draw[->] (0,0)--(0,1);
draw[->,name path=pathA] (0,0)--(2,-2) node[below]{A};
draw[<-] (0,0)--(-.8,-.8);}
}},name path global=pathB] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
path[ draw=blue,
postaction={decoration={
markings,
mark=at position 1 with {draw[->] (0,0)--(0,1);}
},decorate},
intersection segments={of=pathA and pathB,
sequence={R2},
},];
end{tikzpicture}
end{document}
I compute (and draw in blue for illustration purposes) the intersection segment to the point where the original smooth plot intersects with the line labeled A
. This point with now have position 1 in the segment. One can then e.g. draw a normal vector at this point.
1
I'm always learning new features from you!
– CarLaTeX
2 days ago
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
2 days ago
1
Lol, my ducktor!
– CarLaTeX
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
This question is actually less innocent than it might appear to you. Luckily pgfplots
(!) has its means to decompose a path into intersection segments, which, in turn, one can decorate. In this MWE
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepgfplotslibrary{fillbetween}
begin{document}
begin{tikzpicture}
draw[postaction={decorate,decoration={
markings,
mark=at position 0.4 with {draw[->] (0,0)--(0,1);
draw[->,name path=pathA] (0,0)--(2,-2) node[below]{A};
draw[<-] (0,0)--(-.8,-.8);}
}},name path global=pathB] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
path[ draw=blue,
postaction={decoration={
markings,
mark=at position 1 with {draw[->] (0,0)--(0,1);}
},decorate},
intersection segments={of=pathA and pathB,
sequence={R2},
},];
end{tikzpicture}
end{document}
I compute (and draw in blue for illustration purposes) the intersection segment to the point where the original smooth plot intersects with the line labeled A
. This point with now have position 1 in the segment. One can then e.g. draw a normal vector at this point.
1
I'm always learning new features from you!
– CarLaTeX
2 days ago
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
2 days ago
1
Lol, my ducktor!
– CarLaTeX
2 days ago
add a comment |
up vote
4
down vote
accepted
This question is actually less innocent than it might appear to you. Luckily pgfplots
(!) has its means to decompose a path into intersection segments, which, in turn, one can decorate. In this MWE
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepgfplotslibrary{fillbetween}
begin{document}
begin{tikzpicture}
draw[postaction={decorate,decoration={
markings,
mark=at position 0.4 with {draw[->] (0,0)--(0,1);
draw[->,name path=pathA] (0,0)--(2,-2) node[below]{A};
draw[<-] (0,0)--(-.8,-.8);}
}},name path global=pathB] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
path[ draw=blue,
postaction={decoration={
markings,
mark=at position 1 with {draw[->] (0,0)--(0,1);}
},decorate},
intersection segments={of=pathA and pathB,
sequence={R2},
},];
end{tikzpicture}
end{document}
I compute (and draw in blue for illustration purposes) the intersection segment to the point where the original smooth plot intersects with the line labeled A
. This point with now have position 1 in the segment. One can then e.g. draw a normal vector at this point.
1
I'm always learning new features from you!
– CarLaTeX
2 days ago
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
2 days ago
1
Lol, my ducktor!
– CarLaTeX
2 days ago
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
This question is actually less innocent than it might appear to you. Luckily pgfplots
(!) has its means to decompose a path into intersection segments, which, in turn, one can decorate. In this MWE
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepgfplotslibrary{fillbetween}
begin{document}
begin{tikzpicture}
draw[postaction={decorate,decoration={
markings,
mark=at position 0.4 with {draw[->] (0,0)--(0,1);
draw[->,name path=pathA] (0,0)--(2,-2) node[below]{A};
draw[<-] (0,0)--(-.8,-.8);}
}},name path global=pathB] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
path[ draw=blue,
postaction={decoration={
markings,
mark=at position 1 with {draw[->] (0,0)--(0,1);}
},decorate},
intersection segments={of=pathA and pathB,
sequence={R2},
},];
end{tikzpicture}
end{document}
I compute (and draw in blue for illustration purposes) the intersection segment to the point where the original smooth plot intersects with the line labeled A
. This point with now have position 1 in the segment. One can then e.g. draw a normal vector at this point.
This question is actually less innocent than it might appear to you. Luckily pgfplots
(!) has its means to decompose a path into intersection segments, which, in turn, one can decorate. In this MWE
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{decorations.markings}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepgfplotslibrary{fillbetween}
begin{document}
begin{tikzpicture}
draw[postaction={decorate,decoration={
markings,
mark=at position 0.4 with {draw[->] (0,0)--(0,1);
draw[->,name path=pathA] (0,0)--(2,-2) node[below]{A};
draw[<-] (0,0)--(-.8,-.8);}
}},name path global=pathB] plot [smooth cycle] coordinates {(0,0) (1,1) (3,1) (3,0) (2,-1)};
path[ draw=blue,
postaction={decoration={
markings,
mark=at position 1 with {draw[->] (0,0)--(0,1);}
},decorate},
intersection segments={of=pathA and pathB,
sequence={R2},
},];
end{tikzpicture}
end{document}
I compute (and draw in blue for illustration purposes) the intersection segment to the point where the original smooth plot intersects with the line labeled A
. This point with now have position 1 in the segment. One can then e.g. draw a normal vector at this point.
answered 2 days ago
marmot
78k487166
78k487166
1
I'm always learning new features from you!
– CarLaTeX
2 days ago
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
2 days ago
1
Lol, my ducktor!
– CarLaTeX
2 days ago
add a comment |
1
I'm always learning new features from you!
– CarLaTeX
2 days ago
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
2 days ago
1
Lol, my ducktor!
– CarLaTeX
2 days ago
1
1
I'm always learning new features from you!
– CarLaTeX
2 days ago
I'm always learning new features from you!
– CarLaTeX
2 days ago
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
2 days ago
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
2 days ago
1
1
Lol, my ducktor!
– CarLaTeX
2 days ago
Lol, my ducktor!
– CarLaTeX
2 days 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%2f461379%2ffinding-an-intersection-with-respect-to-the-decoration%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
A
is a node. What you mean by intersection ofA
with plot?– nidhin
2 days ago
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
2 days ago