MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > Intersection of a plane and finite line segment in... 

Subject: Intersection of a plane and finite line segment in 3D space From: Liana Date: 4 Apr, 2011 00:23:04 Message: 1 of 10 
Hi, 
Subject: Intersection of a plane and finite line segment in 3D space From: Roger Stafford Date: 4 Apr, 2011 00:35:05 Message: 2 of 10 
"Liana" wrote in message <inb318$kcs$1@fred.mathworks.com>... 
Subject: Intersection of a plane and finite line segment in 3D space From: Liana Date: 4 Apr, 2011 00:59:05 Message: 3 of 10 
Thanks, Roger. Let me just clarify one more thing: in my case P1 is a point [10 10 10]. so, is it enough just to check if dot(normal,P4P1) and dot(normal,P5P1) have opposite sign? 
Subject: Intersection of a plane and finite line segment in 3D space From: Roger Stafford Date: 4 Apr, 2011 01:23:04 Message: 4 of 10 
"Liana" wrote in message <inb54p$lpc$1@fred.mathworks.com>... 
Subject: Intersection of a plane and finite line segment in 3D space From: Liana Date: 4 Apr, 2011 02:21:04 Message: 5 of 10 
I suppose that I missed one thing: P1 = [10 10 10] Do these numbers correspond to x,y and z coordinates of the same point or do they correspond to 'x' coordinates of three points? As far as I understand the second variant is correct. (?) 
Subject: Intersection of a plane and finite line segment in 3D space From: Liana Date: 4 Apr, 2011 02:28:04 Message: 6 of 10 
The thing is that if I assume that P1, P2 and P3 are points with x,y,z coordinates, then sometimes I get incorrect results: 
Subject: Intersection of a plane and finite line segment in 3D space From: Liana Date: 4 Apr, 2011 06:54:04 Message: 7 of 10 
I'm sorry, I should paraphrase my question. What I'm searching is the intersection of the line segment and the triangle (not tetrahedron) in 3D space. I think that's the reason why I get incorrect results. In fact, the triangle belongs to the plane, but it is just a fragment of that plane. Does anybody know how to update my code to determine such intersection? Thanks a lot for any suggestion. 
Subject: Intersection of a plane and finite line segment in 3D space From: Rune Allnor Date: 4 Apr, 2011 07:51:20 Message: 8 of 10 
On Apr 4, 8:54 am, "Liana " <liananapalk...@email.arizona.edu> wrote: 
Subject: Intersection of a plane and finite line segment in 3D space From: Liana Date: 4 Apr, 2011 08:16:04 Message: 9 of 10 
Thanks, Rune. Another solution could be the following: 1) check if the ray intersects the triangle, and 2) in case of intersection, check if the intersection point belongs to the line segment defined by two points in 3D. 
Subject: Intersection of a plane and finite line segment in 3D space From: Rune Allnor Date: 4 Apr, 2011 08:29:26 Message: 10 of 10 
On Apr 4, 10:16 am, "Liana " <liananapalk...@email.arizona.edu> wrote: 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.