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

sknano.core.geometric_regions.Cylinder.contains

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

Test region membership of point in Cylinder.

Parameters:

point : array_like

Returns:

bool

True if point is within Cylinder, False otherwise.

Notes

A point (px,py,pz) is within the bounded region of a cylinder with radius r around the line from p1=(x1,y1,z1) to p2=(x2,y2,z2) if the following is true:

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

where q is:

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