I’m using the Plots library to visualise some randomly generated gravitational motion in a gif. I generate a Vector{Vector{Vector{Float64}}}
, which can be thought of as a list of frames, where each frame has a list of bodies, each of which is a list of 3 coordinates in 3D space. I can plot these with plot3d()
and a loop to add the position of each body in its own series on the plot, and I can animate this with @gif
.
My problem is that the camera angle makes it hard to see some of the more intricate 3D motions. It can be hard to tell where a body is, and whether it moves in front or behind another body. I have experimented with an oscillating camera angle using a cos function that takes the number of the current frame, but that distorted the plot and made it worse, in my opinion.
What I want is to have four separate subplots on the plot. The main one would be the default 3d camera, but then there would be three other subplots below it, showing orthogonal projections from each cardinal direction. I basically want the layout seen on the DifferentialEquations.jl animation page, but without the plot over time.
https://diffeq.sciml.ai/stable/basics/plot/#Example
But I’m not doing a differential equation, so I don’t have that sol
object, and I’m trying to render it as a gif, so I think I need to put all the subplots in the same loop and add each frame to them, unless there’s an easy way of mapping my list of lists of lists onto frames in an animation.
I’m very new to Julia and don’t really understand subplots at all, especially not in an animation like this, so any help would be greatly appreciated.