Implemented sphere indices calculation

Signed-off-by: seaworthy <konstatin.k.yurchenko@gmail.com>