Sounds like an interesting project!
Randomness is pretty easy as long as you are using webcore. There are a number of different ways to do it, but it can definitely be done.
Distance detection is not easy.
2a) There are some types of sensors, particularly radar-based ones, which can do that, but those are not the ones that you buy off-the-shelf to work with SmartThings. If you are a maker type and into robotics, you could probably build something that would do it (it’s the same kind of sensor that keeps a robot vacuum cleaner from running into walls), but it’s not simple.
There are other ways to do it but they all require lots and lots of devices. That can get expensive.
2b) The most certain way would probably be to set up a grid of interruptible IR beams, And then as the visitor enters different sections of the grid, trigger different light behavior. But that’s both complicated and expensive.
2c) If you’re willing to settle for just a couple of zones, maybe two or three, I think you could put a tube over a motion sensor lens to greatly narrow the detection field And then change the light settings as different sensors triggered. That would be easier and less expensive then the beam grid, but A lot more trial and error to set up. ( I thought about using a pressure Mat in some zones, but I think that spoils the effect as it would be obvious to the visitor what was triggering the change in the light)
2d) There may be some proximity lamps you can buy that do get brighter as you get closer, and then you would just control their power source. So it’s essentially the same kind of zones as 2c), but with a device that does it’s own dim Setting. You’d have a lot less control over that, though, and I don’t know if the timing would work. But I just mention it in case it’s something you want to look into. (These are typically sold for commercial use where retailers want to have a display light up as someone walks past. But there are also some sold for residential use, particularly in shop lighting.)
2e) If you’re willing to have the visitor wear a wristband, you could do this quite easily with Beacon technology, but the detection devices are phones, which can get expensive unless there are some you can borrow for the exhibit. I have mixed feelings about this one. I can pretty readily imagine how you would set it up, and I think it would be reliable and interesting, but there are also ways for the visitor to mess it up mid performance Which I don’t like.
Anyway, there are some possibilities for distance detection, but I don’t know how practical they will be for your project.