How to render such interactive 3D scenes/plots in Makie?

I’m working on this molecule simulation and wanna make a couple of dots move around in 3D. I’ve worked with GLMakie very little (was creating just some basic scenes). In fact, I’ve worked with plots for the first time too.

plotly() backend of Plots.jl seems very handy. The 3D panning is superb. Is there something of this sort in Makie? I’m unable to figure a way out to update the render scene quickly enough in Plots.jl so as to give a real-time simulation feel (currently I’m just creating new plots with every update).

I wondered if Observables and GLmakie’s speed would do the trick. But I would love some interactivity of a similar kind that would help me pan about the molecule. There isn’t much on the website regarding 3D scenes in detail. Also, I would like to get rid of the axis and ticks eventually, is there some showaxis=false parameter in Makie if scenes is not something I would wanna work with?

Sure you can do all sorts of things with GLMakie. Just something basic to get started with:

using GLMakie

molecule = cumsum(randn(Point3f, 500))

s = Scene(; camera = cam3d!)
meshscatter!(s, molecule, markersize = rand(0.6:0.1:1.5, 500), color = rand(500))
center!(s)
s

4 Likes

Woah! Thank you! That’s amazing! Any good and detailed documentation as well as tutorials on the usage of scene and it’s different attributes that you might have in mind?