Dropping a ball on an uneven surface - physics!

I was wondering if anyone could direct me to a physics tutorial on dropping a ball on an uneven surface, for example, a slope or a jagged line. Thus the ball would bounce and change trajectory based on how fast it hit and the angle in which it hit. I’m guessing acceleration, gravity and angle would be the appropriate objectives.

Hopefully there’s some code out there that could give me a hand on where to start. Thanks guys!