Finding an intersection with respect to the decoration
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
add a comment |
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
Ais a node. What you mean by intersection ofAwith plot?
– nidhin
Nov 23 '18 at 9:04
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
Nov 23 '18 at 9:12
add a comment |
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
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
edited Nov 23 '18 at 8:32
AndréC
8,31611445
8,31611445
asked Nov 23 '18 at 8:30
FabianFabian
303
303
Ais a node. What you mean by intersection ofAwith plot?
– nidhin
Nov 23 '18 at 9:04
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
Nov 23 '18 at 9:12
add a comment |
Ais a node. What you mean by intersection ofAwith plot?
– nidhin
Nov 23 '18 at 9:04
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
Nov 23 '18 at 9:12
A is a node. What you mean by intersection of A with plot?– nidhin
Nov 23 '18 at 9:04
A is a node. What you mean by intersection of A with plot?– nidhin
Nov 23 '18 at 9:04
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
Nov 23 '18 at 9:12
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
Nov 23 '18 at 9:12
add a comment |
1 Answer
1
active
oldest
votes
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
Nov 23 '18 at 12:50
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
Nov 23 '18 at 20:03
1
Lol, my ducktor!
– CarLaTeX
Nov 23 '18 at 20:04
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/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
});
}
});
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
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
Nov 23 '18 at 12:50
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
Nov 23 '18 at 20:03
1
Lol, my ducktor!
– CarLaTeX
Nov 23 '18 at 20:04
add a comment |
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
Nov 23 '18 at 12:50
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
Nov 23 '18 at 20:03
1
Lol, my ducktor!
– CarLaTeX
Nov 23 '18 at 20:04
add a comment |
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 Nov 23 '18 at 11:34
marmotmarmot
90.3k4104195
90.3k4104195
1
I'm always learning new features from you!
– CarLaTeX
Nov 23 '18 at 12:50
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
Nov 23 '18 at 20:03
1
Lol, my ducktor!
– CarLaTeX
Nov 23 '18 at 20:04
add a comment |
1
I'm always learning new features from you!
– CarLaTeX
Nov 23 '18 at 12:50
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
Nov 23 '18 at 20:03
1
Lol, my ducktor!
– CarLaTeX
Nov 23 '18 at 20:04
1
1
I'm always learning new features from you!
– CarLaTeX
Nov 23 '18 at 12:50
I'm always learning new features from you!
– CarLaTeX
Nov 23 '18 at 12:50
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
Nov 23 '18 at 20:03
@CarLaTeX Just don't tell your doctor that you are learning things from a marmot, bad things could happen. ;-)
– marmot
Nov 23 '18 at 20:03
1
1
Lol, my ducktor!
– CarLaTeX
Nov 23 '18 at 20:04
Lol, my ducktor!
– CarLaTeX
Nov 23 '18 at 20:04
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%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
Ais a node. What you mean by intersection ofAwith plot?– nidhin
Nov 23 '18 at 9:04
A was the name i gave to the arrow to distinguish it. Sorry for the bad naming.
– Fabian
Nov 23 '18 at 9:12