[HELP] How to compute a bounce angle

Try it like so:

This would give up to X bounces as in the loop. We start at the yellow point.

Script to copy and clean up: