Loading [MathJax]/jax/output/HTML-CSS/jax.js

sknano.core.geometric_regions.Cone.contains

Cone.contains(point)[source][source]

Test region membership of point in Cone.

Parameters:

point : array_like

Returns:

bool

True if point is within Cone, False otherwise.

Notes

A point (px,py,pz) is within the bounded region of a cone with a base of radius r centered at p1=(x1,y1,z1) and tip at p2=(x2,y2,z2) if the following is true:

0q1(x1px+(x2x1)q)2+(y1py+(y2y1)q)2+(z1pz+(z2z1)q)2r2q2

where q is:

q=(pxx1)(x2x1)+(pyy1)(y2y1)+(pzz1)(z2z1)(x2x1)2+(y2y1)2+(z2z1)2