Accept 3D coordinates in bounds()

Closes #178.