http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052
MATLAB Central Newsreader  Detect if a point is inside of a cone or not, in 3D space
Feed for thread: Detect if a point is inside of a cone or not, in 3D space
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Tue, 28 Apr 2009 01:01:02 +0000
Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645779
Paulo
Hi everyone,<br>
<br>
How is possible to detect if a 3D point is inside of a cone or not?<br>
<br>
Thank you for your attention.

Tue, 28 Apr 2009 01:21:02 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645782
Roger Stafford
"Paulo " <paulofreitas7@portugalmail.pt> wrote in message <gt5kge$s4h$1@fred.mathworks.com>...<br>
> How is possible to detect if a 3D point is inside of a cone or not?<br>
<br>
Hint: What can you say about the angle a line between the point in question and the cone vertex makes with the cone's central axis?<br>
<br>
Roger Stafford

Tue, 28 Apr 2009 02:33:01 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645798
Gustavo Morales
Roger Stafford:<br>
<br>
> Hint: What can you say about the angle a line between the point in question and the cone vertex makes with the cone's central axis?<br>
> <br>
> Roger Stafford<br>
<br>
Roger Stafford:<br>
<br>
First of all, sorry for my English.<br>
<br>
Remember that a conic surface is that engendred by a straight line that moves in such way that always goes by a fixed curve and a fixed point not contained in the plane's curve. <br>
<br>
"A fixed curve" could be whatever, (not necessarily a circle or an ellipse) so the angle you are talking could be variable and couldn't have any sense talking about an axis' cone<br>
:(

Tue, 28 Apr 2009 03:40:03 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645811
Roger Stafford
"Gustavo Morales" <gustavo.morales.2000@gmail.com> wrote in message <gt5pst$n71$1@fred.mathworks.com>...<br>
> Remember that a conic surface is that engendred by a straight line that moves in such way that always goes by a fixed curve and a fixed point not contained in the plane's curve. <br>
> "A fixed curve" could be whatever, (not necessarily a circle or an ellipse) so the angle you are talking could be variable and couldn't have any sense talking about an axis' cone<br>
<br>
In English there are two definitions of a "cone", one of them a rightcircular cone and the other the more general definition in terms of the "directrix" curve you speak of. Using the latter definition the problem can be reduced to projecting the given point onto a point in the plane of the directrix and determining whether the projected point lies inside that directrix. This last problem can be an easy or very difficult one depending on how the directrix is defined.<br>
<br>
Roger Stafford

Tue, 28 Apr 2009 04:07:01 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645813
Gustavo Morales
Roger Stafford:<br>
> In English there are two definitions of a "cone", one of them a rightcircular cone and the other the more general definition in terms of the "directrix" curve you speak of. Using the latter definition the problem can be reduced to projecting the given point onto a point in the plane of the directrix and determining whether the projected point lies inside that directrix. This last problem can be an easy or very difficult one depending on how the directrix is defined.<br>
> <br>
> Roger Stafford<br>
<br>
The same is in Spanish: Everybody can talk about a cone and they'll think in a circular cone, or a witch cap...... not in a "directrix" curve :D ... We don't know what Paulo would want to say in this newsgroup...<br>
<br>
By other hand, I'm afraid I'm not agree with you Roger, because there's points outside the cone (circular or not) whose proyection in the directrix plane lies inside the area enclosed by the directrix. I'd like to show you in a drawing... but...<br>
<br>
What do you think about my proposed idea to Paulo? Don't you think is simple? I'm assuming that he has the cone equation in general form, not in "spline form" or some other rare form.

Tue, 28 Apr 2009 04:25:03 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645818
Matt Fig
"Gustavo Morales" <gustavo.morales.2000@gmail.com> wrote in message <br>
> By other hand, I'm afraid I'm not agree with you Roger, because there's points outside the cone (circular or not) whose proyection in the directrix plane lies inside the area enclosed by the directrix. I'd like to show you in a drawing... but...<br>
> <br>
<br>
<br>
That would depend on the projection. If by projection it is mean that a line is drawn from the point of the directrix through the point in question and through the plane containing the closed curve, then it would have to be in the plane curve, no?

Tue, 28 Apr 2009 05:00:18 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645823
Gustavo Morales
Matt Fig:<br>
<br>
Hi ! (excuse for my english...)<br>
> You said: That would depend on the projection. If by projection it is mean that a line is drawn from the point of the directrix through the point in question and through the plane containing the closed curve, then it would have to be in the plane curve, no?<br>
<br>
> Roger said: the problem can be reduced to projecting the given point onto a point in the plane of the directrix and determining whether the projected point lies inside that directrix.<br>
<br>
> Gustavo says: I understand you not so well Matt.... <br>
"..from the point of the directrix..": What point? directrix is a curve and has infinite points. Are you meaning "the vertex"?. <br>
<br>
And I don't know projections from a point to a point. <br>
<br>
And... remember the directrix is just one curve, not infinit curves. The conic surface is generated by moving a straight line fixed at a point (vertex) over a fixed curve (directrix). Vertex and Directrix are not coplanars.<br>
<br>
Besides, I suppose that (because Roger is omitting the type of projection) he's talking about an "orthogonal projection" of a point onto a plane. In thaaat general case, I have to say it, there will be external points which projections lies inside the area enclosed by directrix curve and there will be internal points which projections lies outside that area. <br>
<br>
Somebody can tell me why my suggestion to Paulo is not the simpler way to do it in a general case: cone equation = f(x,y,z) = 0 ?

Tue, 28 Apr 2009 05:11:02 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645824
Roger Stafford
"Gustavo Morales" <gustavo.morales.2000@gmail.com> wrote in message <gt5vd5$l42$1@fred.mathworks.com>...<br>
> By other hand, I'm afraid I'm not agree with you Roger, because there's points outside the cone (circular or not) whose proyection in the directrix plane lies inside the area enclosed by the directrix. I'd like to show you in a drawing... but...<br>
<br>
Yes, I agree with Matt; it depends on what you mean by "projection". What I meant was that you draw a straight line in one direction starting from the vertex of the cone through the point to be tested. If you intersect the plane of the directrix, that intersection point is to be tested for being inside or outside the directrix curve. Otherwise, if the plane is never encountered, the point is certainly outside. There is another definition of a cone that includes both branches of the cone extending infinitely far on either side of the vertex from the directrix. In this definition the above projection line through a point is extended both directions from the vertex. If one of these directions intersects the plane of the directrix curve and inside the curve, then the point is inside this extended cone; otherwise it is outside.<br>
<br>
Roger Stafford

Tue, 28 Apr 2009 05:27:01 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645825
Roger Stafford
"Gustavo Morales" <gustavo.morales.2000@gmail.com> wrote in message <gt62h2$fef$1@fred.mathworks.com>...<br>
> Besides, I suppose that (because Roger is omitting the type of projection) he's talking about an "orthogonal projection" of a point onto a plane. In thaaat general case, I have to say it, there will be external points which projections lies inside the area enclosed by directrix curve and there will be internal points which projections lies outside that area. <br>
<br>
No, Gustavo, I am NOT referring to an orthogonal projection onto the plane of the directrix! As I said before, it is a projection from the cone's vertex through the point to be tested and intersecting the plane of the directrix curve if possible. If the intersection point lies inside the directrix curve, then the tested point lies inside the cone. If it lies outside the curve or if the onedirectional projection never intersects the directrix plane, then the tested point lies outside. That seems to me to be a very clear concept. I don't see the point of all this arguing about definitions.<br>
<br>
Roger Stafford

Tue, 28 Apr 2009 05:49:01 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645826
Gustavo Morales
Roger Stafford<br>
<br>
> > By other hand, I'm afraid I'm not agree with you Roger, because there's points outside the cone (circular or not) whose proyection in the directrix plane lies inside the area enclosed by the directrix. I'd like to show you in a drawing... but...<br>
> <br>
> Yes, I agree with Matt; it depends on what you mean by "projection". What I meant was that you draw a straight line in one direction starting from the vertex of the cone through the point to be tested. If you intersect the plane of the directrix, that intersection point is to be tested for being inside or outside the directrix curve. Otherwise, if the plane is never encountered, the point is certainly outside. There is another definition of a cone that includes both branches of the cone extending infinitely far on either side of the vertex from the directrix. In this definition the above projection line through a point is extended both directions from the vertex. If one of these directions intersects the plane of the directrix curve and inside the curve, then the point is inside this extended cone; otherwise it is outside.<br>
> <br>
> Roger Stafford<br>
<br>
The cone mathematic definition is one. Same for projection (is oblique or orthogonal)!. The cone (mathematically) always has two folds, certainly. <br>
<br>
And what are you saying now is different: draw a straight line from vertex to test point. Now that's correct!<br>
If this line (or its prolongation, which is not a projection, ..maybe an oblique one) intersects the directrix plane inside the directrix, your proposal is right!<br>
<br>
But, if you do it in that way, you'll have to verify if intersection point is inside or not the directrix (what you're going to do know?: "The directrix divides the plane in 3 regions... and so on...").... So....I prefer directly verify if the point is inside the cone looking at the sign of f(xo,yo,zo)<br>
<br>
I'm going to sleep... Thanks.. I've learned a lot in this blog

Tue, 28 Apr 2009 10:19:01 +0000
Re: Detect if a point is inside of a cone or not, in 3D space
http://www.mathworks.com/matlabcentral/newsreader/view_thread/250052#645866
Gustavo Morales
Hi Roger! (again :s)<br>
<br>
I just want to tell you I'm going to need some help, from you and the community. I'm learning about Matlab, Mathematics, Programming, including English... So I have to appreciate your help and patient... Sorry if I was insistent... Maybe it happens when I'm getting sleepy.. I just was looking for the truth and the best solution.. This kind of solution all of you always offers here :)