Multiple moves based on point location

Greetings!
I’m working on an animation to illustrate the concept of rounding numbers. I have a draggable point on a number line that should drop from its location, land on the ramp and roll to the nearest tenth, whole, 10, hundred, etc.
Currently, the point will fall to its correct landing point on the ramp for the numbers 0-5. I’ve hit a roadblock from that point. I’m not sure how to tell the point to roll on the diagonal after hitting the ramp. I’m also a bit stuck on how to make this work for both sides of the ramp.

Rounding Decimals Animation

Any help you can provide would be very much appreciated.

Best,
Mike

Hi,
Not the most elegant solution but here is a little demo of something that might help.

Hi Mike, I made a copy with the approach I would take. The idea is to use the mod function so that you can have the same motions at any location on the number line. The other idea is to use transformations of the median function to control animation times. Take a look and let me know if you have questions about it: Rounding Decimals Animation 2 | Desmos

Thank you, Greg! This is helpful as I am working on another idea using a similar dropping animation. I think this will work really well for that context. I appreciate your time. Thank you, again, for your help.

Hi Daniel. I appreciate your help with this. I think I had a pretty good start this time around until I realized I didn’t know how to get past 5. :grinning: I’ll definitely let you know if I have any questions as I finalize the activity.
Thanks, again, for your help.