Finding an intersection with respect to the decoration











up vote
3
down vote

favorite
1












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










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.




















  • 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















up vote
3
down vote

favorite
1












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










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.




















  • 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













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





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










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.











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






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








edited 2 days ago









AndréC

6,24711140




6,24711140






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 2 days ago









Fabian

303




303




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.












  • 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 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 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










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}


enter image description here



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.






share|improve this answer

















  • 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











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%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








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}


enter image description here



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.






share|improve this answer

















  • 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















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}


enter image description here



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.






share|improve this answer

















  • 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













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}


enter image description here



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.






share|improve this answer












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}


enter image description here



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.







share|improve this answer












share|improve this answer



share|improve this answer










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














  • 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










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%2f461379%2ffinding-an-intersection-with-respect-to-the-decoration%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

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei