GLVis / glvis

Lightweight OpenGL tool for accurate and flexible finite element visualization
http://glvis.org
BSD 3-Clause "New" or "Revised" License
251 stars 51 forks source link

Movies #233

Closed salomole closed 1 year ago

salomole commented 2 years ago

Hello,

I would like to make a movie by taking several snapshot, but I don't know which command to write in the code for that ?

Best wishes,

tzanio commented 2 years ago

Hi @salomole,

If it is a spinning movie, you can press S while the visualization is rotating (Shift + Left Mouse) which will generate a sequence of screenshots: GLVis_m00*.png.

For more general movies, you can use a GLVis script. See this section for a simple example.

Hope this helps, Tzanio

salomole commented 2 years ago

Hello ! Thank you for your answer, but I would like to know the screenshot command to insert in my code (using MFEM). Do you know it ? At each time step, I would like a screenshot (in a 2D plane) of a Gridfunction.

v-dobrev commented 2 years ago

Both the stream and the script commands use the format screenshot filename.png. The stream command is processed here: https://github.com/GLVis/glvis/blob/c092dc8f62a8ce37aa1d738d0d4f5db71f6856fb/lib/threads.cpp#L835