by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 4.8, Creation date: 2019-12-28, Last change: 2025-09-14
See Also: Bravaislattice
[n,nn,VL]=vectorinBB([BB,v,p])
BB: | Bounding Box | |
v: | vector to check | |
p: | point to start with; default is 0 |
n: | rows of integer [min i max i] | |
nn: | row [minx maxx miny maxy minz maxz] | |
VL: | Vertex list including p0 if possible |
vectorinBB([0 3 0 2 0 1],[.2 .2 .2],[.5 .5 .5]) % Point inside BB and solutions exist
vectorinBB([0 3 0 2 0 1],[.2 .2 .2],[5 5 5]) % Point outside BB and solutions exist
vectorinBB([0 3 0 2 0 1],[0 0 0],[0 5 0]) % Point outside BB and no soltion exist
vectorinBB([0 3 0 2 0 1],[0 0 0],[.5 .5 .5]) % Point is inside BB and only p0 exist
vectorinBB([0 3 0 2 0 1],[0 0 1],[.5 .5 .5]) % Point is inside BB and only p0 exist