Path: news.mathworks.com!not-for-mail
From: "Gustavo Morales" <gustavo.morales.2000@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Detect if a point is inside of a cone or not, in 3D space
Date: Tue, 28 Apr 2009 05:49:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <gt65cd$ob5$1@fred.mathworks.com>
References: <gt5kge$s4h$1@fred.mathworks.com> <gt5llu$cas$1@fred.mathworks.com> <gt5pst$n71$1@fred.mathworks.com> <gt5tqj$c60$1@fred.mathworks.com> <gt5vd5$l42$1@fred.mathworks.com> <gt6356$110$1@fred.mathworks.com>
Reply-To: "Gustavo Morales" <gustavo.morales.2000@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1240897741 24933 172.30.248.37 (28 Apr 2009 05:49:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 28 Apr 2009 05:49:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1796991
Xref: news.mathworks.com comp.soft-sys.matlab:535875

Roger Stafford

> >  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...
> 
>   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.
> 
> Roger Stafford

The cone mathematic definition is one. Same for projection (is oblique or orthogonal)!. The cone (mathematically) always has two folds, certainly. 

And what are you saying now is different: draw a straight line from vertex to test point. Now that's correct!
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!

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)

I'm going to sleep... Thanks.. I've learned a lot in this blog