From: Bruce S. <Bru...@nc...> - 2012-06-08 04:47:43
|
I've now converted the VPython demo program gas.py to GlowScript: http://www.glowscript.org/#/user/GlowScriptDemos/folder/Examples/program/HardSphereGas To run the program, you need to have a WebGL-enabled browser and a modern graphics card. For details, see the Help at glowscript.org. As for speed, this is what I found: VPython gas.py with 100 atoms, dt = 1e-5, no graphing: 100 iterations = 1.1 seconds. This similar Glowsript program with same conditions: 100 iterations = 11.7 seconds. Presumably the big difference is the Python numpy library, which runs at C speed, and which eliminates some explicit loops. Bruce Sherwood |