coords.Coords.bounding_box_point#
- Coords.bounding_box_point(position)#
Return a bounding box point of a
Coords.Bounding box points are points whose coordinates are either the minimal value, the maximal value or the middle value for the Coords. Combining the three values in three dimensions results in 3**3 = 27 alignment points. The corner points of the bounding box are a subset of these.
Parameters#
- position: str
String of three characters, one for each direction 0, 1, 2. Each character should be one of the following
‘-’: use the minimal value for that coordinate,
‘+’: use the maximal value for that coordinate,
‘0’: use the middle value for that coordinate.
Any other character will set the corresponding coordinate to zero.
Notes#
A string ‘000’ is equivalent with
center(). The values ‘—’ and ‘+++’ give the points of the bounding box.See Also#
align(): translate Coords by bounding_box_point
Examples#
>>> X = Coords([[0.,0.,0.],[1.,1.,1.]]) >>> print(X.bounding_box_point('-0+')) [0. 0.5 1. ]