Physics Asked on April 15, 2021
I am a graduate student in physics and many times when I am working on something/playing around with some expressions I would like to visualize how it looks on the computer. I usually already know (or can figure out) how to numerically get the results.
If what I am looking at is "static" (e.g. Magnetization vs Temperature for the Ising Model) I can visualize it easily using the plotting feature of different libraries (seaborn, mathematica, etc.)
However I have tried searching but I am at a loss how I would even animate something simple like this:
or something more complicated like this:
Whenever I try to look it up, it always gives me simulators. I already know how to get the results I just want.
But what software could I use for either feeding in the results or "linking" with the calculation to get a visualization of it?
If there are multiple such programs, what are their strengths and weaknesses?
Whenever I try to look it up, it always gives me simulators.
I don't understand what that means short of something that is a single-problem solution which someone else has written. I guess you want to write your own simulation for a variety of problems.
Depending on the size of the population, Glowscript is a web-based python-like 3D animation language that lets you create 3D particles and shapes and move them around easily. There are tons of examples available at the site or by searching. check it out at http://glowscript.org
Glowscript has also been implemented at http://trinket.io
There is also a package, vpython, that provides 3D animation like glowscript for python.
Python notebooks (Jupyter) allow you to animation parameters of functions one has graphed, and there are several posts at Stack Overflow about this.
Answered by Bill N on April 15, 2021
About animation:
Here is what I do to create animation:
(These are animations that run in a browser)
To create a view I use a Javascript library called JSXGraph.
JSXGraph is developed by a small team of people at the 'Lehrstuhl für Mathematik und ihre Didaktik'. Bayreuth, Germany.
JSXGraph generates the SVG code for the view, and it automates creation of all kinds of curves, for instance splines. See the JSXGraph API reference
JSXGraph is designed to be dynamic. The position of any view element can be set up as a function of something else. Because of that dynamic nature JSXGraph readily supports animation.
Animation calculation is programmed in Javascript. The Javascript call 'setInterval' sets up the cycle of rendering the animation frames.
I use JSXGraph because for the viewers that is the most accessible. (The animations are on my website.)
It may be that what you want to create is for personal use only. Apart from accessibility: I think html/javascript is extremely likely to remain backwards compatible forever.
Let's say you start using glowscript. Well, what if that project is abandoned? It could be that at some point in the future you can no longer run those simulations, because there is a breaking change in the rendering platform. I looked at the descriptions of glowscript, and I decided against using it because the architecture kind of looks like a Rube Goldberg machine to me.
JSXGraph: I expect that even if JSXGraph development halts then for the from-that-moment-on-frozen-in-time library no browser incompatibility will arise ever, hence existing animations remaining functional.
Before starting to use JSXGraph I used a simulation environment called EJS.
EJS is the life's work of a spanish mathematician called Francisco Esquembre.
EJS runs on the Java Platform.
But when Oracle acquired Sun Microsystems stewardship of the Java platform went to Oracle, and Oracle pushes for business use only. So Francisco Esquembre saw his life's work evaporate, in the sense that today few consumers have Java on their system.
The current state of EJS is that while development of simulations still requires the Java platform, the output is a simulation that runs in the browser. (That is: what is being generated is javascript code.)
The way I understand your question is that your main requirement is that you need a general purpose platform. That means you need a platform that allows you to write the source code for the physics yourself, with the platform providing rendering functionality.
In my case those requirements led me to choosing JSXGraph.
I anticipate that in the future, when I want to do 3D rendering, I will start using a javascript 3D rendering library.
Answered by Cleonis on April 15, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP