Testing sphere cast algorithm