port of lodev.org raycaster to Python