Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Cut a plane through 3D surface

Subject: Cut a plane through 3D surface

From: GAURAV

Date: 23 Nov, 2010 04:47:04

Message: 1 of 5

Hi!

Suppose I have a bunch of 3D points. I want to cut a plane which passes through 4 coplanar points. I want to get rid of the points below the plane and get the 3D surface above the plane. How can I do that?

Regards,
Gaurav

Subject: Cut a plane through 3D surface

From: Walter Roberson

Date: 23 Nov, 2010 05:23:15

Message: 2 of 5

On 22/11/10 10:47 PM, GAURAV wrote:

> Suppose I have a bunch of 3D points. I want to cut a plane which passes
> through 4 coplanar points.

You only need 3 coplanar points to establish a plane. If you are given 4
points instead, then you have to decide whether to _assume_ they are
co-planar or whether to _check_ whether they are co-planar and decide
what to do if they are not (or suppose they are very very close and it
might plausibly be round-off error?)

> I want to get rid of the points below the
> plane and get the 3D surface above the plane. How can I do that?

There is more than one way to do that.

- once you have the plane, you can rotate all of the points so that the
plane aligns with the coordinate axes; the points "below" the plane
would all be on one side of the axes and the points "above" the plane
would all be on the other side.

- there are calculations you can do using dot products to determine the
angles. I remember how do this for 2D but I have forgotten at the moment
how to do it for 3D.

I'm sure you could do a google search on how to decide which side of a
plane a point is on.

Subject: Cut a plane through 3D surface

From: Roger Stafford

Date: 23 Nov, 2010 05:38:04

Message: 3 of 5

"GAURAV " <gsharda@engineering.uiowa.edu> wrote in message <icfh08$f5t$1@fred.mathworks.com>...
> Suppose I have a bunch of 3D points. I want to cut a plane which passes through 4 coplanar points. I want to get rid of the points below the plane and get the 3D surface above the plane. How can I do that?
- - - - - - - - -
  It takes only three points to determine a plane in three dimensions. Let the three points be P1, P2, and P3, each a three-element row or column vector. Choose their order so that their projections onto the x-y plane would be in counterclockwise order going from P1 to P2 to P3. Then an arbitrary point P will be below the plane whenever

 dot(P-P1,cross(P2-P1,P3-P1)) < 0

Roger Stafford

Subject: Cut a plane through 3D surface

From: GAURAV

Date: 23 Nov, 2010 06:44:04

Message: 4 of 5

Thanks a lot for your response. Appreciate it. :)
Walter Roberson <roberson@hushmail.com> wrote in message <8dIGo.30961$E64.12340@newsfe11.iad>...
> On 22/11/10 10:47 PM, GAURAV wrote:
>
> > Suppose I have a bunch of 3D points. I want to cut a plane which passes
> > through 4 coplanar points.
>
> You only need 3 coplanar points to establish a plane. If you are given 4
> points instead, then you have to decide whether to _assume_ they are
> co-planar or whether to _check_ whether they are co-planar and decide
> what to do if they are not (or suppose they are very very close and it
> might plausibly be round-off error?)
>
> > I want to get rid of the points below the
> > plane and get the 3D surface above the plane. How can I do that?
>
> There is more than one way to do that.
>
> - once you have the plane, you can rotate all of the points so that the
> plane aligns with the coordinate axes; the points "below" the plane
> would all be on one side of the axes and the points "above" the plane
> would all be on the other side.
>
> - there are calculations you can do using dot products to determine the
> angles. I remember how do this for 2D but I have forgotten at the moment
> how to do it for 3D.
>
> I'm sure you could do a google search on how to decide which side of a
> plane a point is on.

Subject: Cut a plane through 3D surface

From: GAURAV

Date: 23 Nov, 2010 06:44:04

Message: 5 of 5

Thanks a lot for your response. Appreciate it. :)
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <icfjvs$rr7$1@fred.mathworks.com>...
> "GAURAV " <gsharda@engineering.uiowa.edu> wrote in message <icfh08$f5t$1@fred.mathworks.com>...
> > Suppose I have a bunch of 3D points. I want to cut a plane which passes through 4 coplanar points. I want to get rid of the points below the plane and get the 3D surface above the plane. How can I do that?
> - - - - - - - - -
> It takes only three points to determine a plane in three dimensions. Let the three points be P1, P2, and P3, each a three-element row or column vector. Choose their order so that their projections onto the x-y plane would be in counterclockwise order going from P1 to P2 to P3. Then an arbitrary point P will be below the plane whenever
>
> dot(P-P1,cross(P2-P1,P3-P1)) < 0
>
> Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

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.

Contact us