```Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Intersection of a plane and finite line segment in 3D space
Date: Mon, 4 Apr 2011 02:21:04 +0000 (UTC)
Organization: University of Arizona
Lines: 15
Message-ID: <inb9ug\$4tn\$1@fred.mathworks.com>
References: <inb318\$kcs\$1@fred.mathworks.com> <inb3np\$1bs\$1@fred.mathworks.com> <inb54p\$lpc\$1@fred.mathworks.com> <inb6ho\$d0e\$1@fred.mathworks.com>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1301883664 5047 172.30.248.48 (4 Apr 2011 02:21:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 4 Apr 2011 02:21:04 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:719847

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. (?)

% Plane
P1 = [10 10 10]; P2 = [20 10 10]; P3 = [10 10 20];
% Line segment
P4 = [5 5 5]; P5 = [13.75 12.5 2.5];

"Roger Stafford" wrote in message <inb6ho\$d0e\$1@fred.mathworks.com>...
> "Liana" wrote in message <inb54p\$lpc\$1@fred.mathworks.com>...
> > 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,P4-P1) and dot(normal,P5-P1) have opposite sign?
> - - - - - - - - -
>   Yes, it is sufficient.  The respective values of dot(normal,P4-P1) and dot(normal,P5-P1) are unchanged if you replace P1 with P2 or P3, because all three points lie in the plane.
>
> Roger Stafford
```