• Create Account

#Actualtaby

Posted 20 May 2012 - 11:49 AM

Loosely speaking, a primitive is generally defined by an equation(s), and the set of solutions to that equation(s) defines where a specific instance of that primitive exists.

Two instances of primitives overlap where their two sets of solutions overlap (ie. literally, intersect).

That said, do you really think that two line segments in 3D are likely to ever intersect? They really wouldn't be likely to do so, if you think about it, which is why clb gave you the hint to go a different route and instead get the shortest "co-perpendicular" line segment that spans between them. Here's a nice link explaining the general idea, in English (and codelish), for two line segments in 3D:

http://local.wasp.uw...try/lineline3d/

Bourke has some seriously great things on his website. Note how he explains that both a line and a line segment can be defined parametrically by two points and a scalar, in the exact same form. Like Bourke says, the scalar has an interval of [0, 1] for the line segment, and an interval of for the line. Same difference.

In general, just remember that it's the set of solutions that defines where a specific instance of a primitive exists, and that the overlap of solutions is where two specific instances of primitives intersect. If you still don't quite get what I mean, then know that you'd likely get a better sense of it if you work through a line-circle/sphere intersection test . Don't be confused by the fact that they define the line using a point and a unit vector; it's basically the same thing that Bourke did, but in a slightly different dressing. You'd be very well off to figure out how to convert between the two forms. Tinker.

Once you really get the idea in general, you'd likely be able to write your own intersection tests on the fly.

#23taby

Posted 20 May 2012 - 11:48 AM

Loosely speaking, a primitive is generally defined by an equation(s), and the set of solutions to that equation(s) defines where a specific instance of that primitive exists.

Two instances of primitives overlap where their sets of solutions overlap (ie. literally, intersect).

That said, do you really think that two line segments in 3D are likely to ever intersect? They really wouldn't be likely to do so, if you think about it, which is why clb gave you the hint to go a different route and instead get the shortest "co-perpendicular" line segment that spans between them. Here's a nice link explaining the general idea, in English (and codelish), for two line segments in 3D:

http://local.wasp.uw...try/lineline3d/

Bourke has some seriously great things on his website. Note how he explains that both a line and a line segment can be defined parametrically by two points and a scalar, in the exact same form. Like Bourke says, the scalar has an interval of [0, 1] for the line segment, and an interval of for the line. Same difference.

In general, just remember that it's the set of solutions that defines where a specific instance of a primitive exists, and that the overlap of solutions is where two specific instances of primitives intersect. If you still don't quite get what I mean, then know that you'd likely get a better sense of it if you work through a line-circle/sphere intersection test . Don't be confused by the fact that they define the line using a point and a unit vector; it's basically the same thing that Bourke did, but in a slightly different dressing. You'd be very well off to figure out how to convert between the two forms. Tinker.

Once you really get the idea in general, you'd likely be able to write your own intersection tests on the fly.

#22taby

Posted 20 May 2012 - 11:47 AM

Loosely speaking, a primitive is generally defined by an equation(s), and the set of solutions to that equation(s) defines where a specific instance of that primitive exists.

Two instances of primitives overlap where the set of solutions overlap.

That said, do you really think that two line segments in 3D are likely to ever intersect? They really wouldn't be likely to do so, if you think about it, which is why clb gave you the hint to go a different route and instead get the shortest "co-perpendicular" line segment that spans between them. Here's a nice link explaining the general idea, in English (and codelish), for two line segments in 3D:

http://local.wasp.uw...try/lineline3d/

Bourke has some seriously great things on his website. Note how he explains that both a line and a line segment can be defined parametrically by two points and a scalar, in the exact same form. Like Bourke says, the scalar has an interval of [0, 1] for the line segment, and an interval of for the line. Same difference.

In general, just remember that it's the set of solutions that defines where a specific instance of a primitive exists, and that the overlap of solutions is where two specific instances of primitives intersect. If you still don't quite get what I mean, then know that you'd likely get a better sense of it if you work through a line-circle/sphere intersection test . Don't be confused by the fact that they define the line using a point and a unit vector; it's basically the same thing that Bourke did, but in a slightly different dressing. You'd be very well off to figure out how to convert between the two forms. Tinker.

Once you really get the idea in general, you'd likely be able to write your own intersection tests on the fly.

#21taby

Posted 20 May 2012 - 11:46 AM

Loosely speaking, a primitive is generally defined by an equation(s), and the set of solutions to that equation(s) defines where a specific instance of that primitive exists.

Two instances of primitives overlap where the set of solutions overlap.

That said, do you really think that two line segments in 3D are likely to ever intersect? They really wouldn't be likely to do so, if you think about it, which is why clb gave you the hint to go a different route and instead get the shortest "co-perpendicular" line segment that spans between them. Here's a nice link explaining the general idea, in English (and codelish), for two line segments in 3D:

http://local.wasp.uw...try/lineline3d/

Bourke has some seriously great things on his website. Note how he explains that both a line and a line segment can be defined parametrically by two points and a scalar, in the exact same form. Like Bourke says, the scalar has an interval of [0, 1] for the line segment, and an interval of for the line. Same difference.

In general, just remember that it's the set of solutions that defines where a specific instance of a primitive exists, and that the overlap of solutions is where two specific instances of primitives intersect. If you still don't quite get what I mean, then know that you'd likely get a better sense of it if you work through a line-circle/sphere intersection test . Don't be confused by the fact that they define the line using a point and a unit vector; it's basically the same thing that Bourke did, but in a slightly different dressing. You'd be very well off to figure out how to convert between the two forms. Tinker.

Once you really get the idea in general, you'd likely be able to write your own intersection test code on the fly.

#20taby

Posted 20 May 2012 - 11:46 AM

Loosely speaking, a primitive is generally defined by an equation(s), and the set of solutions to that equation(s) defines where a specific instance of that primitive exists.

Two instances of primitives overlap where the set of solutions overlap.

That said, do you really think that two line segments in 3D are likely to ever intersect? They really wouldn't be likely to do so, if you think about it, which is why clb gave you the hint to go a different route and instead get the shortest "co-perpendicular" line segment that spans between them. Here's a nice link explaining the general idea, in English (and codelish), for two line segments in 3D:

http://local.wasp.uw...try/lineline3d/

Bourke has some seriously great things on his website. Note how he explains that both a line and a line segment can be defined parametrically by two points and a scalar, in the exact same form. Like Bourke says, the scalar has an interval of [0, 1] for the line segment, and an interval of for the line. Same difference.

In general, just remember that it's the set of solutions that defines where a specific instance of a primitive exists, and that the overlap of solutions is where two specific instances of primitives intersect. If you still don't quite get what I mean, then know that you'd likely get a better sense of it if you work through a line-circle/sphere intersection test . Don't be confused by the fact that they define the line using a point and a unit vector; it's basically the same thing that Bourke did, but in a slightly different dressing. You'd be very well off to figure out how to convert between the two forms. Tinker. Once you really get the idea in general, you'd likely be able to write your own intersection test code on the fly.

#19taby

Posted 20 May 2012 - 11:46 AM

Loosely speaking, a primitive is generally defined by an equation(s), and the set of solutions to that equation(s) defines where a specific instance of that primitive exists.

Two instances of primitives overlap where the set of solutions overlap.

That said, do you really think that two line segments in 3D are likely to ever intersect? They really wouldn't be likely to do so, if you think about it, which is why clb gave you the hint to go a different route and instead get the shortest "co-perpendicular" line segment that spans between them. Here's a nice link explaining the general idea, in English (and codelish), for two line segments in 3D:

http://local.wasp.uw...try/lineline3d/

Bourke has some seriously great things on his website. Note how he explains that both a line and a line segment can be defined parametrically by two points and a scalar, in the exact same form. Like Bourke says, the scalar has an interval of [0, 1] for the line segment, and an interval of for the line. Same difference.

In general, just remember that it's the set of solutions that defines where a specific instance of a primitive exists, and that the overlap of solutions is where two specific instances of primitives intersect. If you still don't quite get what I mean, then know that you'd likely get a better sense of it if you work through a line-circle/sphere intersection test . Don't be confused by the fact that they define the line using a point and a unit vector. It's basically the same thing that Bourke did, but in a slightly different dressing. You'd be very well off to figure out how to convert between the two forms. Tinker. Once you really get the idea in general, you'd likely be able to write your own intersection test code on the fly.

PARTNERS