I did not get time go through Miquel's
scene but here is way :-
Refer to this diagram:
Part I (Finding whether the point is inside cone)
This would be a better solution (found on web but the math seems
right):
S1 - Vector for one side of the cone = Vector p1 - vector p2
S2 - Vector for the second side of the cone = Vector p1 - vector
p4
p3 - Point Vector to test
Take the vector S2-S1 and the vector p3-S1. Normalize them both to
unit length. Take their dot product. If this number is greater
than or equal to the
**cosine of the half-angle at the
apex of the cone, then the point is inside the cone. (If it's
exactly equal, then P3 is on the cone.)
** cosine of the half angle at the apex of cone: Can be easily
found in ICE by angle between vectors node for the vector (S1
& S2). Divide by 2 and then take a cos of that.
Part II (Finding the distance of the point from the central
line of the cone)
This one comes from me :)
B = vector p4 - vector p2
p5 = 1 /2 of B
L = p1 - p5
Find the distance between point p3 and vector B through ICE.
Cheers !