Hi, I need some help with a simulation I'm doing with water tanks. I am trying to show the water level slowly increasing but if I use a for loop it always changes the level instantly without showing the gradual increase. All I'm trying to do is make the level increase slowly but I cannot seem to figure it out?? Also, is there any way to rotate the water tanks in EJS to a certain degree measure?
You are exactly correct. If you compute all your data in a loop the data and the state of the system is displayed at the end of the loop. To show the data as it is being generated you must do a time evolution. Evolve the system using an appropriate time step and EjsS will display the state of the system after every timestep. See, for example: