The simulation was created with Physlet library written by Wolfgang in the U.S.
You can find information about [url=http://webphysics.davidson.edu/Applets/Applets.html]physlet[/url] and check out their document to find out what can be done with it.
What I did was just add the User Interface, so that you do not need to write those javascript code to create simulations. However, You can create more complicate simulation if you can write it with javascript.
It was not created with EJS. May be you can use GUI elements like surface to create the effect you want.
However, I never try it before.

Sorry about the error when you try to download it. It was written for my Chinese web site. And, I modify the code to have english interface. but I forgot to change the database name in the code. It is fixed now(At least work form me). Please try it again.