mrdoob/three.js — pull request #3748 by jotinha (2013-08-12 18:55:21+00:00)
Title: boundingSpheres with arbitrary centers

Following #3689, #3446 and others, I've made modifications to `Raycaster` and `Frustum` to support spheres with arbitrary centers. The relevant bit of code is

```
sphere.copy( geometry.boundingSphere );
sphere.applyMatrix4( object.matrixWorld );
```

Additionally, I've updated `Sphere.setFromPoints` so that it calculates a better bounding sphere. First it calculates a boundingBox around the points and uses its center as the sphere's center (unless `optionalCenter` is given, in which case that is used instead). Then, it calculates the minimum radius as in the old `setFromCenterAndPoints`.

There are other, better, but more complex algorithms to build an optimal boundingSphere. Do you think it's worth to go into that?