I am sure code exists somewhere for this. Especially for pinball type games.
However, what method would you use to enable a ball to rebound off any angle such as demonstrated here:
However, what method would you use to enable a ball to rebound off any angle such as demonstrated here: