Desmos Marble Slides Challenge
So I recently came across a fun little trend where you play this game with desmos. The way the game goes is there's a position that drops several marbles with slightly randomized velocity and collect a number of stars, as the marbles bounce along user defined functions.
Well anyways, I started playing around with a lesson plan designed for teaching linear equations, and of course breezed through the early lessons. At some point I thought to myself, well i can do some of these multi-line problems with one equations if i dont use linear functions. So here's what some of those look like
That one was pretty simple. A little finicky and rng dependent because sometimes they all bounce to one side, hence the sliding the function over by 0.01 to get them more centered. Here's a more fun one you can create with a tweaked 1/x to build momentum, summed with a linear equation to form an asymptote, then limited by restricting the x input to create a bit of a ramp
I used a similar trick earlier in this problem right here
One problem however gave me significant trouble to try to one-line, and that would be this problem here
I tried multiple things. I tried mirrored, cut circles that formed a pair of half pipes (hitting the sharp edge killed too much momentum for the marbles to go anywhere), I tried vertical sine wave variations with holes cut in them to filter marbles back and forth. I tried creating an upside parabola with a weird elliptic curve cutting into the vertex to get marbles to wobble from side to side. None of it worked. That is, until I had a genius solution.
When in doubt, turn it into a pachinko game c: used some modular arithmetic and domain repetition I borrowed from raymarching
And thus, this beauty was formed c:









