Ray Casting Algorithm Python Example Code