Detect Crossed Paths on a Plane Given Coordinates.












0












$begingroup$


If you have the $X$ and $Y$ coordinates for $2$ lines on a $2D$ plane/graph is it possible to detect via true/false if they cross paths? I'm just trying to detect if lines are not parrallell.



If $(X,Y)$ is $(20, 20)$ to $(X_2,Y_2)$ of $(30,30)$
and a second line is $(X_3,Y_3) (18,22)$ to $(X_4,Y_4)$ of $(30,25)$.










share|cite|improve this question











$endgroup$












  • $begingroup$
    Do you know how to compute slopes for both lines?
    $endgroup$
    – David K
    Dec 17 '18 at 20:04










  • $begingroup$
    I'll be honest I'm appalling at math as a whole. I have no idea how to but can probably Google that one. What would I do after calculating the slopes?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:05
















0












$begingroup$


If you have the $X$ and $Y$ coordinates for $2$ lines on a $2D$ plane/graph is it possible to detect via true/false if they cross paths? I'm just trying to detect if lines are not parrallell.



If $(X,Y)$ is $(20, 20)$ to $(X_2,Y_2)$ of $(30,30)$
and a second line is $(X_3,Y_3) (18,22)$ to $(X_4,Y_4)$ of $(30,25)$.










share|cite|improve this question











$endgroup$












  • $begingroup$
    Do you know how to compute slopes for both lines?
    $endgroup$
    – David K
    Dec 17 '18 at 20:04










  • $begingroup$
    I'll be honest I'm appalling at math as a whole. I have no idea how to but can probably Google that one. What would I do after calculating the slopes?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:05














0












0








0





$begingroup$


If you have the $X$ and $Y$ coordinates for $2$ lines on a $2D$ plane/graph is it possible to detect via true/false if they cross paths? I'm just trying to detect if lines are not parrallell.



If $(X,Y)$ is $(20, 20)$ to $(X_2,Y_2)$ of $(30,30)$
and a second line is $(X_3,Y_3) (18,22)$ to $(X_4,Y_4)$ of $(30,25)$.










share|cite|improve this question











$endgroup$




If you have the $X$ and $Y$ coordinates for $2$ lines on a $2D$ plane/graph is it possible to detect via true/false if they cross paths? I'm just trying to detect if lines are not parrallell.



If $(X,Y)$ is $(20, 20)$ to $(X_2,Y_2)$ of $(30,30)$
and a second line is $(X_3,Y_3) (18,22)$ to $(X_4,Y_4)$ of $(30,25)$.







plane-geometry






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 17 '18 at 20:42









Shubham Johri

5,189718




5,189718










asked Dec 17 '18 at 19:55









DaveyBoy85DaveyBoy85

31




31












  • $begingroup$
    Do you know how to compute slopes for both lines?
    $endgroup$
    – David K
    Dec 17 '18 at 20:04










  • $begingroup$
    I'll be honest I'm appalling at math as a whole. I have no idea how to but can probably Google that one. What would I do after calculating the slopes?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:05


















  • $begingroup$
    Do you know how to compute slopes for both lines?
    $endgroup$
    – David K
    Dec 17 '18 at 20:04










  • $begingroup$
    I'll be honest I'm appalling at math as a whole. I have no idea how to but can probably Google that one. What would I do after calculating the slopes?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:05
















$begingroup$
Do you know how to compute slopes for both lines?
$endgroup$
– David K
Dec 17 '18 at 20:04




$begingroup$
Do you know how to compute slopes for both lines?
$endgroup$
– David K
Dec 17 '18 at 20:04












$begingroup$
I'll be honest I'm appalling at math as a whole. I have no idea how to but can probably Google that one. What would I do after calculating the slopes?
$endgroup$
– DaveyBoy85
Dec 17 '18 at 20:05




$begingroup$
I'll be honest I'm appalling at math as a whole. I have no idea how to but can probably Google that one. What would I do after calculating the slopes?
$endgroup$
– DaveyBoy85
Dec 17 '18 at 20:05










1 Answer
1






active

oldest

votes


















0












$begingroup$

$2$ non-parallel lines will always intersect. If the lines are parallel, they may or may not be coincident.



For a straight line, its slope $m=frac{y_2-y_1}{x_2-x_1}$, where $(x_1,y_1),(x_2,y_2)$ are two distinct points on the line, describes how the line is inclined with respect to the $x$ axis. The slopes of two parallel lines are equal and unequal for non-parallel lines.



So, you will have to find the slope of the lines. If they are unequal, they intersect at a unique point. Otherwise, the lines are parallel. If, then, they are coincident, the slope of the line joining any point on one line and any point on the second line is equal to the slope of either line. If that's not the case, they don't intersect.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    So in the case in the original post its 10/10 and -12/-3. So since unequal theres a definite intersect between them?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:36










  • $begingroup$
    Yes. Well, the slope of the second line is $3/12$, but that doesn't matter because if the slopes are unequal, so are their reciprocals. You should read more about straight lines and their slopes online.
    $endgroup$
    – Shubham Johri
    Dec 17 '18 at 20:39











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3044364%2fdetect-crossed-paths-on-a-plane-given-coordinates%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









0












$begingroup$

$2$ non-parallel lines will always intersect. If the lines are parallel, they may or may not be coincident.



For a straight line, its slope $m=frac{y_2-y_1}{x_2-x_1}$, where $(x_1,y_1),(x_2,y_2)$ are two distinct points on the line, describes how the line is inclined with respect to the $x$ axis. The slopes of two parallel lines are equal and unequal for non-parallel lines.



So, you will have to find the slope of the lines. If they are unequal, they intersect at a unique point. Otherwise, the lines are parallel. If, then, they are coincident, the slope of the line joining any point on one line and any point on the second line is equal to the slope of either line. If that's not the case, they don't intersect.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    So in the case in the original post its 10/10 and -12/-3. So since unequal theres a definite intersect between them?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:36










  • $begingroup$
    Yes. Well, the slope of the second line is $3/12$, but that doesn't matter because if the slopes are unequal, so are their reciprocals. You should read more about straight lines and their slopes online.
    $endgroup$
    – Shubham Johri
    Dec 17 '18 at 20:39
















0












$begingroup$

$2$ non-parallel lines will always intersect. If the lines are parallel, they may or may not be coincident.



For a straight line, its slope $m=frac{y_2-y_1}{x_2-x_1}$, where $(x_1,y_1),(x_2,y_2)$ are two distinct points on the line, describes how the line is inclined with respect to the $x$ axis. The slopes of two parallel lines are equal and unequal for non-parallel lines.



So, you will have to find the slope of the lines. If they are unequal, they intersect at a unique point. Otherwise, the lines are parallel. If, then, they are coincident, the slope of the line joining any point on one line and any point on the second line is equal to the slope of either line. If that's not the case, they don't intersect.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    So in the case in the original post its 10/10 and -12/-3. So since unequal theres a definite intersect between them?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:36










  • $begingroup$
    Yes. Well, the slope of the second line is $3/12$, but that doesn't matter because if the slopes are unequal, so are their reciprocals. You should read more about straight lines and their slopes online.
    $endgroup$
    – Shubham Johri
    Dec 17 '18 at 20:39














0












0








0





$begingroup$

$2$ non-parallel lines will always intersect. If the lines are parallel, they may or may not be coincident.



For a straight line, its slope $m=frac{y_2-y_1}{x_2-x_1}$, where $(x_1,y_1),(x_2,y_2)$ are two distinct points on the line, describes how the line is inclined with respect to the $x$ axis. The slopes of two parallel lines are equal and unequal for non-parallel lines.



So, you will have to find the slope of the lines. If they are unequal, they intersect at a unique point. Otherwise, the lines are parallel. If, then, they are coincident, the slope of the line joining any point on one line and any point on the second line is equal to the slope of either line. If that's not the case, they don't intersect.






share|cite|improve this answer









$endgroup$



$2$ non-parallel lines will always intersect. If the lines are parallel, they may or may not be coincident.



For a straight line, its slope $m=frac{y_2-y_1}{x_2-x_1}$, where $(x_1,y_1),(x_2,y_2)$ are two distinct points on the line, describes how the line is inclined with respect to the $x$ axis. The slopes of two parallel lines are equal and unequal for non-parallel lines.



So, you will have to find the slope of the lines. If they are unequal, they intersect at a unique point. Otherwise, the lines are parallel. If, then, they are coincident, the slope of the line joining any point on one line and any point on the second line is equal to the slope of either line. If that's not the case, they don't intersect.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Dec 17 '18 at 20:29









Shubham JohriShubham Johri

5,189718




5,189718












  • $begingroup$
    So in the case in the original post its 10/10 and -12/-3. So since unequal theres a definite intersect between them?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:36










  • $begingroup$
    Yes. Well, the slope of the second line is $3/12$, but that doesn't matter because if the slopes are unequal, so are their reciprocals. You should read more about straight lines and their slopes online.
    $endgroup$
    – Shubham Johri
    Dec 17 '18 at 20:39


















  • $begingroup$
    So in the case in the original post its 10/10 and -12/-3. So since unequal theres a definite intersect between them?
    $endgroup$
    – DaveyBoy85
    Dec 17 '18 at 20:36










  • $begingroup$
    Yes. Well, the slope of the second line is $3/12$, but that doesn't matter because if the slopes are unequal, so are their reciprocals. You should read more about straight lines and their slopes online.
    $endgroup$
    – Shubham Johri
    Dec 17 '18 at 20:39
















$begingroup$
So in the case in the original post its 10/10 and -12/-3. So since unequal theres a definite intersect between them?
$endgroup$
– DaveyBoy85
Dec 17 '18 at 20:36




$begingroup$
So in the case in the original post its 10/10 and -12/-3. So since unequal theres a definite intersect between them?
$endgroup$
– DaveyBoy85
Dec 17 '18 at 20:36












$begingroup$
Yes. Well, the slope of the second line is $3/12$, but that doesn't matter because if the slopes are unequal, so are their reciprocals. You should read more about straight lines and their slopes online.
$endgroup$
– Shubham Johri
Dec 17 '18 at 20:39




$begingroup$
Yes. Well, the slope of the second line is $3/12$, but that doesn't matter because if the slopes are unequal, so are their reciprocals. You should read more about straight lines and their slopes online.
$endgroup$
– Shubham Johri
Dec 17 '18 at 20:39


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics 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.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3044364%2fdetect-crossed-paths-on-a-plane-given-coordinates%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

How do I know what Microsoft account the skydrive app is syncing to?

Grease: Live!

When does type information flow backwards in C++?