Adding spherical function

Signed-off-by: Cristian Maureira-Fredes <cmaurei@aei.mpg.de>