I should have told you, if you are serious about it. You should download EJS and installed it directly into your computer. Load EJS as a signed applet is a quick way to run EJS inside a browser. Please check out [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=95.0]Easy java simulation (Download and related informations)[/url]
Copy the previous saved source code brownianmotion.xml to EJS/Simulation
Click EjsConsole.jar under EJS. A local EJS version will be ready for you.
It will be faster and you can work off-line.
Do you mean you want to change the number of particles shown in the simulation?
In the model, number of particle is defined as n(the default value is 800).
If you want to change the number of particle in the simulation.
I would suggest you go to the model panel.
Find out variable n under tab-name (Disks)
Left click n, then right click to select "add a variable".
Then enter n1 as variable name, set default value to n. (or n/2 or whatever reasonable value),
Then switch Constraints tabs.
Change all the n in the for loop to n1. (You only need to change two "n" to "n1". So all the calculation are with number of n1 particles)
If you want you can also change "n" in initialization page to "n1".
Now, it is all done with the model.
We need to change the VIEW. Find ParticleSet and ArrowSet.
Change the property "Elements" from "n" to "n1".
Add we need to modify GUI to set n1.
You can add slider or NumberField for your pourpose.
Or if you do not need the "size" slider , just change the property of "Slidersize".
1. change it variable from "sizen" to n1.
2. set minimum to minimun number of particle.
3. set maximum to n.
4. set Format field to something like "n=0" or "n=#"
You will see the change at the same time in the editor window.
Run the new simulation and you will be able to get a new simulation you want.
Please take a look at EJS manual or document from EJS's home site.
You can download latest version from their web site ,too.