What would happen if, instead of having the Origin at (0,0,0), which results in sin and cos being -ve in certain segments, you translate the centre of the object to (r0, r0 , r1 ) so that X, Y and Z are always positive?

Alternatively, and probably the best way is to do the cheat that Roxy proposed:

1. Restrict the ranges of theta and phi to between 0 an pi.
2. Do three translations to put this quarter into the other three quadrants.
3. Consecrate the Union.

OME