Orientation of 4 + 1 lines in $mathbb{R}^3$.
up vote
1
down vote
favorite
I'm working on a 3D algorithm that at some point establishes orientation of two lines - the same way one would do using the triple product. The way those lines are described, however, makes the computation much more complicated: the first line (let's call it line $M$) is given as a pair of points (let's say $M_a$ and $M_b$) that $M$ goes through. The second line (let's say $L$) is a line that intersects four line segments given in the form of four pairs of points. In other words, there is a line segment that goes from a point $L_{1a}$ to point $L_{1b}$, another segment that goes from point $L_{2a}$ to point $L_{2b}$, another from $L_{3a}$ to $L_{3b}$ and the last one from $L_{4a}$ to $L_{4b}$. All the points are provided (a priori). The line that intersects those four segments is our line $L$. It is guaranteed that there exists exactly one line $L$ that goes through all four segments (e.g. never three of them are coplanar), so there's no need to check if a particular set of given points has a solution.
The question is: do lines $M$ and $L$ intersect, or are they clockwise-skewed, or counter-clockwise-skewed?
My solution goes as follows: the first three of $L$ line segments form a hyperboloid of one sheet or hyperbolic paraboloid (or see *). The fourth one intersects this surface in some point C. If we intersect the first line segment $overline{L_{1a}L_{1b}}$ with a plane that goes through points $L_{2a}$, $L_{2b}$, $C$ or $L_{3a}$, $L_{3b}$, $C$, we get another point $D$. The final solution is a triple product of $([D - C][M_b - M_a][M_a - C])$ - equals zero if $L$ and $M$ intersect, greater than zero if they are cw-skewed, and negative if ccw-skewed.
This solution is impractical from the computational point of view. It's hard to be parallelized and performs extremely large amount of dot products, cross products, additions, negations, plus one inversion and a square root. The last of mentioned operations is not even available on the architecture I'm targeting with the algorithm.
Maybe I'm wrong, but I have a feeling that there exists a solution that does not need to perform all these intermediate calculations, intersection points and square root at all. For example, just like the triple product is a determinant of some matrix built on top of points defining two lines, maybe there's a matrix that can be built from those 10 points and again determinant could be used to establish the final orientation?
Every hint kindly appreciated.
$*$ - if any two of $L$ segments intersect, then this surface degrades to a plane, and if there are two intersections, then it degrades even more - directly to two points: C and D.
linear-algebra matrices geometry determinant orientation
add a comment |
up vote
1
down vote
favorite
I'm working on a 3D algorithm that at some point establishes orientation of two lines - the same way one would do using the triple product. The way those lines are described, however, makes the computation much more complicated: the first line (let's call it line $M$) is given as a pair of points (let's say $M_a$ and $M_b$) that $M$ goes through. The second line (let's say $L$) is a line that intersects four line segments given in the form of four pairs of points. In other words, there is a line segment that goes from a point $L_{1a}$ to point $L_{1b}$, another segment that goes from point $L_{2a}$ to point $L_{2b}$, another from $L_{3a}$ to $L_{3b}$ and the last one from $L_{4a}$ to $L_{4b}$. All the points are provided (a priori). The line that intersects those four segments is our line $L$. It is guaranteed that there exists exactly one line $L$ that goes through all four segments (e.g. never three of them are coplanar), so there's no need to check if a particular set of given points has a solution.
The question is: do lines $M$ and $L$ intersect, or are they clockwise-skewed, or counter-clockwise-skewed?
My solution goes as follows: the first three of $L$ line segments form a hyperboloid of one sheet or hyperbolic paraboloid (or see *). The fourth one intersects this surface in some point C. If we intersect the first line segment $overline{L_{1a}L_{1b}}$ with a plane that goes through points $L_{2a}$, $L_{2b}$, $C$ or $L_{3a}$, $L_{3b}$, $C$, we get another point $D$. The final solution is a triple product of $([D - C][M_b - M_a][M_a - C])$ - equals zero if $L$ and $M$ intersect, greater than zero if they are cw-skewed, and negative if ccw-skewed.
This solution is impractical from the computational point of view. It's hard to be parallelized and performs extremely large amount of dot products, cross products, additions, negations, plus one inversion and a square root. The last of mentioned operations is not even available on the architecture I'm targeting with the algorithm.
Maybe I'm wrong, but I have a feeling that there exists a solution that does not need to perform all these intermediate calculations, intersection points and square root at all. For example, just like the triple product is a determinant of some matrix built on top of points defining two lines, maybe there's a matrix that can be built from those 10 points and again determinant could be used to establish the final orientation?
Every hint kindly appreciated.
$*$ - if any two of $L$ segments intersect, then this surface degrades to a plane, and if there are two intersections, then it degrades even more - directly to two points: C and D.
linear-algebra matrices geometry determinant orientation
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm working on a 3D algorithm that at some point establishes orientation of two lines - the same way one would do using the triple product. The way those lines are described, however, makes the computation much more complicated: the first line (let's call it line $M$) is given as a pair of points (let's say $M_a$ and $M_b$) that $M$ goes through. The second line (let's say $L$) is a line that intersects four line segments given in the form of four pairs of points. In other words, there is a line segment that goes from a point $L_{1a}$ to point $L_{1b}$, another segment that goes from point $L_{2a}$ to point $L_{2b}$, another from $L_{3a}$ to $L_{3b}$ and the last one from $L_{4a}$ to $L_{4b}$. All the points are provided (a priori). The line that intersects those four segments is our line $L$. It is guaranteed that there exists exactly one line $L$ that goes through all four segments (e.g. never three of them are coplanar), so there's no need to check if a particular set of given points has a solution.
The question is: do lines $M$ and $L$ intersect, or are they clockwise-skewed, or counter-clockwise-skewed?
My solution goes as follows: the first three of $L$ line segments form a hyperboloid of one sheet or hyperbolic paraboloid (or see *). The fourth one intersects this surface in some point C. If we intersect the first line segment $overline{L_{1a}L_{1b}}$ with a plane that goes through points $L_{2a}$, $L_{2b}$, $C$ or $L_{3a}$, $L_{3b}$, $C$, we get another point $D$. The final solution is a triple product of $([D - C][M_b - M_a][M_a - C])$ - equals zero if $L$ and $M$ intersect, greater than zero if they are cw-skewed, and negative if ccw-skewed.
This solution is impractical from the computational point of view. It's hard to be parallelized and performs extremely large amount of dot products, cross products, additions, negations, plus one inversion and a square root. The last of mentioned operations is not even available on the architecture I'm targeting with the algorithm.
Maybe I'm wrong, but I have a feeling that there exists a solution that does not need to perform all these intermediate calculations, intersection points and square root at all. For example, just like the triple product is a determinant of some matrix built on top of points defining two lines, maybe there's a matrix that can be built from those 10 points and again determinant could be used to establish the final orientation?
Every hint kindly appreciated.
$*$ - if any two of $L$ segments intersect, then this surface degrades to a plane, and if there are two intersections, then it degrades even more - directly to two points: C and D.
linear-algebra matrices geometry determinant orientation
I'm working on a 3D algorithm that at some point establishes orientation of two lines - the same way one would do using the triple product. The way those lines are described, however, makes the computation much more complicated: the first line (let's call it line $M$) is given as a pair of points (let's say $M_a$ and $M_b$) that $M$ goes through. The second line (let's say $L$) is a line that intersects four line segments given in the form of four pairs of points. In other words, there is a line segment that goes from a point $L_{1a}$ to point $L_{1b}$, another segment that goes from point $L_{2a}$ to point $L_{2b}$, another from $L_{3a}$ to $L_{3b}$ and the last one from $L_{4a}$ to $L_{4b}$. All the points are provided (a priori). The line that intersects those four segments is our line $L$. It is guaranteed that there exists exactly one line $L$ that goes through all four segments (e.g. never three of them are coplanar), so there's no need to check if a particular set of given points has a solution.
The question is: do lines $M$ and $L$ intersect, or are they clockwise-skewed, or counter-clockwise-skewed?
My solution goes as follows: the first three of $L$ line segments form a hyperboloid of one sheet or hyperbolic paraboloid (or see *). The fourth one intersects this surface in some point C. If we intersect the first line segment $overline{L_{1a}L_{1b}}$ with a plane that goes through points $L_{2a}$, $L_{2b}$, $C$ or $L_{3a}$, $L_{3b}$, $C$, we get another point $D$. The final solution is a triple product of $([D - C][M_b - M_a][M_a - C])$ - equals zero if $L$ and $M$ intersect, greater than zero if they are cw-skewed, and negative if ccw-skewed.
This solution is impractical from the computational point of view. It's hard to be parallelized and performs extremely large amount of dot products, cross products, additions, negations, plus one inversion and a square root. The last of mentioned operations is not even available on the architecture I'm targeting with the algorithm.
Maybe I'm wrong, but I have a feeling that there exists a solution that does not need to perform all these intermediate calculations, intersection points and square root at all. For example, just like the triple product is a determinant of some matrix built on top of points defining two lines, maybe there's a matrix that can be built from those 10 points and again determinant could be used to establish the final orientation?
Every hint kindly appreciated.
$*$ - if any two of $L$ segments intersect, then this surface degrades to a plane, and if there are two intersections, then it degrades even more - directly to two points: C and D.
linear-algebra matrices geometry determinant orientation
linear-algebra matrices geometry determinant orientation
edited Nov 20 at 18:06
asked Nov 20 at 16:12
abl
216
216
add a comment |
add a comment |
active
oldest
votes
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',
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
});
}
});
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%2fmath.stackexchange.com%2fquestions%2f3006514%2forientation-of-4-1-lines-in-mathbbr3%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2fmath.stackexchange.com%2fquestions%2f3006514%2forientation-of-4-1-lines-in-mathbbr3%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