Add bounding box calculation and other function in calculations.py

4D homogeneous coordinates are quite common in graphics. For bounding calculations you can just ignore the 4th axis, but there should not be a failure for calling `_bbox` with an array of 4D vectors (and there should definitely not be silent failures in any case).