+ 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)

26th Apr 2018, 5:57 AM
storm
storm - avatar
40 Respuestas
+ 26
Nice to thread
30th Apr 2018, 4:59 AM
Nina Hendra Putri
Nina Hendra Putri - avatar
+ 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.
26th Apr 2018, 6:05 AM
storm
storm - avatar
+ 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
29th Apr 2018, 5:00 PM
Oma Falk
Oma Falk - avatar
+ 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:-)
12th May 2018, 7:39 PM
Joakim Nyland
Joakim Nyland - avatar
+ 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.
26th Apr 2018, 9:36 AM
storm
storm - avatar
+ 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.
29th Apr 2018, 8:26 PM
Sagheb
Sagheb - avatar
+ 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
26th Apr 2018, 7:47 AM
Koushik Naskar
Koushik Naskar - avatar
+ 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
26th Apr 2018, 8:06 AM
Koushik Naskar
Koushik Naskar - avatar
+ 6
No worries! Good luck!:-)
13th May 2018, 6:45 PM
Joakim Nyland
Joakim Nyland - avatar
+ 5
thank you very much Koushik Naskar i needed the push in the right direction. :)
26th Apr 2018, 9:16 AM
storm
storm - avatar
+ 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/
30th Apr 2018, 4:30 AM
Corrado Battagliese
Corrado Battagliese - avatar
+ 5
use 'p5.js' or 'processiong' ,these are easy to use and very good .It might help 😊
30th Apr 2018, 5:01 AM
sushant gupta
sushant gupta - avatar
+ 5
Corrado Battagliese Mathematica is $$ Cheapest version is buying a RaspberryPi. It has Mathematica on board.
30th Apr 2018, 7:10 AM
Oma Falk
Oma Falk - avatar
+ 5
alright then, natlab goes on to the list as well :) thanks Corrado Battagliese
30th Apr 2018, 10:58 AM
storm
storm - avatar
+ 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.
30th Apr 2018, 11:00 AM
Juan Pérez Torralbo
Juan Pérez Torralbo - avatar
+ 5
And for a open source version of Matlab there are octave and scilab.
1st May 2018, 6:03 AM
Edward
Edward - avatar
+ 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.
26th Apr 2018, 8:01 AM
storm
storm - avatar
+ 4
29th Apr 2018, 11:13 PM
Oscar
Oscar - avatar
+ 4
javafx 3D is good for visualisation
30th Apr 2018, 1:09 AM
Иван Сорокин
Иван Сорокин - avatar
+ 4
para que sirven los códigos? ???
30th Apr 2018, 1:43 AM
Alfredo