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:
Detect if a 3D point is inside of a frustum

Subject: Detect if a 3D point is inside of a frustum

From: Paulo

Date: 6 May, 2009 14:30:20

Message: 1 of 6

Hi everyone.

I'm plotting a square frustum by, first plotting a small square (the top of the frustum), second plotting the bigger square (the base of it) and finally plotting the union of the corners of each square. With this I have a frustum, where I know the vertices's of it, but my big problem is detect if a 3D point is inside of this frustum or not. How can I do that?

Thank you very much for your help.
Best regards

Subject: Detect if a 3D point is inside of a frustum

From: Matt Fig

Date: 6 May, 2009 14:55:04

Message: 2 of 6

How is this much different from your other 2 threads dealing with this topic?

Subject: Detect if a 3D point is inside of a frustum

From: Paulo

Date: 6 May, 2009 15:13:01

Message: 3 of 6

"Matt Fig" <spamanon@yahoo.com> wrote in message <gts8c8$4k1$1@fred.mathworks.com>...
> How is this much different from your other 2 threads dealing with this topic?

Dealing with a cone is different dealing with a frustum i think. And plot a frustum i already have the solution. Thanks everyone who helped me.

Subject: Detect if a 3D point is inside of a frustum

From: Paulo

Date: 6 May, 2009 15:24:01

Message: 4 of 6

"Paulo " <paulofreitas7@portugalmail.pt> wrote in message <gts9dt$q22$1@fred.mathworks.com>...
> "Matt Fig" <spamanon@yahoo.com> wrote in message <gts8c8$4k1$1@fred.mathworks.com>...
> > How is this much different from your other 2 threads dealing with this topic?
>
> Dealing with a cone is different dealing with a frustum i think. And plot a frustum i already have the solution. Thanks everyone who helped me.

However i don't how to detect if a point is inside of a frustum or not. This is crucial for me.

Thank you for your help and attention

Subject: Detect if a 3D point is inside of a frustum

From: Matt

Date: 6 May, 2009 15:30:18

Message: 5 of 6

"Paulo " <paulofreitas7@portugalmail.pt> wrote in message <gts6ts$feq$1@fred.mathworks.com>...
> Hi everyone.
>
> I'm plotting a square frustum by, first plotting a small square (the top of the frustum), second plotting the bigger square (the base of it) and finally plotting the union of the corners of each square. With this I have a frustum, where I know the vertices's of it, but my big problem is detect if a 3D point is inside of this frustum or not. How can I do that?
>
> Thank you very much for your help.
> Best regards


Use the vert2con() function on the File Exchange. It will allow you to derive a set of equations for the interior of a frustrum from its vertices. You can then verify if the 3D test point satisfies these equations.

Subject: Detect if a 3D point is inside of a frustum

From: Paulo

Date: 6 May, 2009 16:37:01

Message: 6 of 6

"Matt " <xys@whatever.com> wrote in message <gtsaea$jmb$1@fred.mathworks.com>...
> "Paulo " <paulofreitas7@portugalmail.pt> wrote in message <gts6ts$feq$1@fred.mathworks.com>...
> > Hi everyone.
> >
> > I'm plotting a square frustum by, first plotting a small square (the top of the frustum), second plotting the bigger square (the base of it) and finally plotting the union of the corners of each square. With this I have a frustum, where I know the vertices's of it, but my big problem is detect if a 3D point is inside of this frustum or not. How can I do that?
> >
> > Thank you very much for your help.
> > Best regards
>
>
> Use the vert2con() function on the File Exchange. It will allow you to derive a set of equations for the interior of a frustrum from its vertices. You can then verify if the 3D test point satisfies these equations.

Thank you very much Matt! You solved my problem. This is a very nice function. Thank you very much again.

Best regards

Tags for 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