+ 53
What would be right choice for "visualizing" simulation data in real time?
i'm running a simulation as part of my studies. there's a 3 dimensional simple cubic lattice. like a cube consisting of small spheres. and each sphere has properties attached to it, like temperature, energy etc. you go over each sphere in the lattice (one sweep) and re-calculate these properties, which depend on the same properties of their immediate neighbors. you do the same sweep over the whole lattice hundreds of times and analyze how it's changing. (continued)
40 odpowiedzi
+ 26
Nice to thread
+ 21
(continued)
but doing that analysis with data files is very elaborate.
my question is: for educational purposes, i would like to make a graphic presentation of this simulation. constructing a 3 dimensional cube made of spheres, being able to zoom into any point of the lattice and "watch" how each of the properties of those spheres change in each sweep (maybe by displaying the value inside the sphere or using colors etc.). now, which programming/scripting language would you recommend to use for this kind of visualization? maybe c++ and unity or gtk+? or any other combination of languages? i have no idea whatsoever. ideas will be appreciated. thanks.
+ 19
I played around with data driven documents.
d3js is easy and will do it.
just have a look at the gallery.
find a fitting layout and change the database.
might be sufficient.
https://github.com/d3/d3/wiki/Gallery
+ 14
Hi, thank you for looking at my code. My simulation is made using WebGL (which is a small part of OpenGL), which allows it to run in browsers and on phones.
Here are some libraries I used which should be of good help when making a 3D-simulation with JavaScript (and HTML):
Three.JS
- This library can be used to create the WebGL graphics and a scene containing a camera with orbit controls (and light).
dat.gui.min.js
- This library is used to add graphical user interface to your scene.
OBJ/MTL loaders:
- These libraries are used to add the models to your scene. I don't know how many spheres you want to create, but if you create a sphere in e.g. Blender, you can export it as .obj and .mtl, and then use these libraries to add the sphere(s) to your simulation. To create a non-solid cube you can for example use Three.js line geometry (which I used to create my x,y,z axis).
You can find the links to the libraries I used in my code. Feel free to use parts of my code if you need.
To make my simulation "real time", I used "requestAnimationFrame();". This should be called whenever you want to update your animation onscreen.
TL;DR: JavaScript and WebGL should work to make a real time simulation. WebGL with JavaScript is probably the easiest method to make a 3D simulation which can be viewed by others.
Some further advice:
- Start of by successfully creating the WebGL scene
- Add a simple cube to your scene
- Add spheres
And just build it further...
My preferences for writing/testing code:
- SubLime Text for writing JavaScript code
- Testing code in FireFox browser (using a .html file which calls all your libraries and JavaScript code)
Sorry for long answer, I hope my comment can help you! Best of luck:-)
+ 9
thanks Martin Taylor the pdf on the ibm website was quite good.
i'm working on cellular automata as well. but in 3D instead of 2D. with the "moving in the lattice and zooming to certain parts of it" i was wondering if i could use something like unity3d. but that might be too laborious.
+ 9
as someone answered processing is a good choice for data visualization. it is fast, free and easy to learn. for most of my real time simulations i use simulink. you can find a student version of that under mathworks.
+ 8
I'm doing this kind of research projects for last 1 year. I don't know what exactly your purposes are here. You can write everything from scratch but that will be huge tasks, instead there are some good softwares out there for this purposes.
For visualisation I use VMD and for the actual physics/chemistry part I use LAMMPS, GROMACS, NAMD etc
I would suggest you to look into those
http://www.ks.uiuc.edu/Research/vmd/
http://lammps.sandia.gov
+ 7
Then VMD is the best choice for you, it has more options in visualisation than you can imagine. But there are certain input data format that are acceptable to VMD. VMD supports all the popular simulation tools but if you are making a custom program you might be careful abou the data file format if you want to work with VMD
+ 6
No worries! Good luck!:-)
+ 5
thank you very much Koushik Naskar i needed the push in the right direction. :)
+ 5
Hi storm, do you have any need to avoid dedicated simulation and visualization softwares like MatLab or Mathematica?
They are specialized softwares for mathematical computing and visualization.
https://www.mathworks.com/products/matlab.html
https://www.wolfram.com/mathematica/
+ 5
use 'p5.js' or 'processiong' ,these are easy to use and very good .It might help 😊
+ 5
Corrado Battagliese Mathematica is $$
Cheapest version is buying a RaspberryPi. It has Mathematica on board.
+ 5
alright then, natlab goes on to the list as well :)
thanks Corrado Battagliese
+ 5
I would choose Python and its libraries like Matplotlib and Seaborn. Using desktop applications like Tableau or even Google Charts if what you need is simplicity, flexibility and combination power is a good option. R Language and its graphic libraries are good too.
+ 5
And for a open source version of Matlab there are octave and scilab.
+ 4
thanks for your reply Koushik Naskar i will certainly take a look at them.
my purpose is, only to visualize it. the simulation is done quite effectively on FORTRAN and data for each lattice point is stored in a file.
the program or interface only needs to construct a 3 dimensional structure where you can zoom in and out and move freely inside it (like 3D CAD) to view different parts of the lattice AND take data from the simulation output file and display that data on the appropriate lattice point. data changes with each step. so i would like to see the change of variables with respect to time.
short: take data from file, display it ob 3D structure where you can freely move inside and take a look at lattice points + time steps/evolution.
+ 4
I found this that may be useful for 3d modeling: http://partridgejiang.github.io/Kekule.js/demos/demoLauncher.html?id=autoLaunch
+ 4
javafx 3D is good for visualisation
+ 4
para que sirven los códigos? ???