raycaster for math project