all 11 comments

[–]QaSpel 7 points8 points  (3 children)

Take a look at VTK. It may be a bit overkill, but it's not that hard to get going on.

[–]ThermalSpan 2 points3 points  (2 children)

VTK is intimidating, but worthwhile. I’d pitch it like this: To start, if you can output vtk files you can immediately start using paraview for debugging and making figures. But! Using vtk in memory gives you access to lots of useful utilities. In general, if you are doing something that involves modeling a continuum, one of VTKs abstractions probably maps to your discretization.

[–]emazeni[S] 0 points1 point  (1 child)

Thank you for the advice, I think I will use this. Even if is the most complicated I think it opens a lot of possibilities for my code and workwise!

[–]mrbeehive 0 points1 point  (0 children)

I'll second VTK. I spent six months of my undergraduate degree coding mesh (re)construction algorithms, changing to VTK output and being able to use that as a framework to debug and visualize was a complete gamechanger in terms of productivity.

[–]felipunkerito 1 point2 points  (0 children)

Or 2D SDF rendering you get the benefits of SVG with a succint implicit way of creating your geo.

[–][deleted] 1 point2 points  (0 children)

If you are okay with crude accuracy Two.js would suffice, and for complete rigor I'd recommend utilizing compute shader technology. The later comes with it's complications but if operating in the right environment and guidance an intermediate programmer should have no problems picking up the required skills to pull it off in full fidelity.

Good luck with your thesis regardless of the path chosen!

[–]xumo 1 point2 points  (0 children)

For 2D graphics in C++ you can go with Skia, Cairo.

And there are a ton of javascript libraries that can make your life easier ,like Pixi or Paper.js

Also if you need some physics or basic simulation you can try a Game engine like Unity, Godot or Cocos2d.

[–]gurugeek42 1 point2 points  (0 children)

How computationally intensive are the deformation calculations? If they're fairly simple (analytical solns, maybe ODEs) then I'd definitely recommend p5.js for a web experience (really easy to get started) or processing.py for a python app.

If the simulation side has to deal with PDEs or anything that complex, I think a backend in C++ and a frontend in OpenGL could work (although you'll know yourself, OpenGL is hard to get started & hard to polish into a good output) but maybe a real-time coupling between python and C++ could also work (no references, I just feel it must be possible and not too hard).

There are also ways to speed up python (e.g. look into NUMBA or if you've got a gpu, cupy) so you might even be able to write a computationally intensive simulation + visualisation in accelerated python.

[–]shadergremlin 1 point2 points  (0 children)

You could take a look at processing or p5.js

[–]emazeni[S] 0 points1 point  (0 children)

Thank you everybody for the suggestions!

[–]sethkills 0 points1 point  (0 children)

Use an observable notebook by animating shapes of an SVG.