redesigned the sphere primitive with the new parametric template; this greatly simplifies that part of the code and reduces quite a bit of redundancy; it also shows that using hypercubes as the base for the coordinate space sweep works as intended in higher dimensions