Port SPH rendering to Cython (for Python 3 and future compatibility)