Question: How is possible to detect if a 3D point is inside a cone or not? 

```
Ross cone = (x1, y1, h1)
Cone angle = alpha
Height of the cone = H
Cone radius = R
Coordinates of the point of the cone = P1 (x2, y2, h2)
Coordinates outside the cone = P2( x3, y3, h3)

Result for point1 = true
Result for point2 = false

```

Answer: 
The language-agnostic answer:

* Find the equation of the line defining the main axis of your cone.
* Compute the [distance from the 3D point to the line](http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html), along with the intersection point along the line where the distance is perpendicular to the line.
* Find the radius of your cone at the intersection point and check to see if the distance between the line and your 3D point is greater than (outside) or less than (inside) that radius.
Wouldn't it be easier to compute angle between vector to center of cone and vector from apex pointing at point under evaluation. If vector projection is used and the length of the resultant vector is shorter then the vector pointing at the center of the cone the between the angle and length you know if you are inside a cone.

<https://en.wikipedia.org/wiki/Vector_projection>