I implemented a cloth-simulation algorithm in Julia and visualized the results using MeshViz and GLMakie. The GUI worked fluently and here are some screenshots:
The problem is that I was unable to record a movie. The code is a bit long so I only share the link. A video file is generated but it only has the first frame and is not updated as the GUI window is.
A minimal (non)-working example (adapted from this example):
using Meshes: Ball, Point3
using MeshViz: viz
using GLMakie: record, Observable, @lift
let
time = Observable(0.0)
ball = @lift Ball(rand(Point3), $time % 1.0 + 0.2)
fig = viz(ball; color=:blue)
framerate = 30
timestamps = range(0, 10, step=1/framerate)
record(fig, "time_animation.mp4", timestamps; framerate = framerate) do t
time[] = t
end
end
In the recorded video, the size of the ball does not change with time.
Hi @lucifer1004 , as I mentioned in the issue, it would be great if you could provide a MWE with just a slider instead of a record. If I can run the example locally and see the effects of the slider on the visualization, then I will be able to investigate it further.