coords.Coords.diag_size#
- Coords.diag_size()#
Return the diagonal size of the bounding box of the
Coords.Returns#
- float
The length of the diagonal of the bounding box.
Notes#
All the points of the Coords are inside a sphere with the
center()as center and thediag_size()as length of the diameter (though it is not necessarily the smallest bouding sphere).diag_size()is in general a good estimate for the maximum size of the cross section to be expected when the object can be rotated freely around its center. It is conveniently used to zoom the camera on an object, while guaranteeing that the full object remains visible during rotations.See Also#
bounding_sphere(): return radius of smallest sphere encompassing all pointssizes(): return the length of the bounding box along global axesbounding_box(): return the bounding box
Examples#
>>> print(Coords([[0.,0.,0.],[3.,0.,0.],[0.,3.,0.]]).diag_size()) 4.2426405