Better way for plotting millions of scatter points in GLMakie

I’ve been using Makie/GLMakie for about 2 years now, and am by no means an expert. I am mostly employing makie for its 3D plotting capabilities.
Currently, I am trying to make 3D plots of plasma turbulence data in magnetic confinement devices.

What I have so far is just the millions of data points from the simulation I ran, plotted using scatter(). The colors corresponding to values at the specific points in real space and the seemingly random cyan line is the line of sight of a diagnostic tool.

This has worked decently well for what my purposes are, but I wanted to make this plot much prettier. E.g. when I change angle of the plot, there is too great of density of points that it can’t be displayed properly.

Ideally I would like to know a better work around for getting these plots (for example maybe just making a surface of the outside most points) and also a way for plotting the cyan line, where it is a 3D cylinder, rather than a 2D line which it is now.

If anyone has suggestions it would be greatly appreciated! Thanks!

Are you able to calculate paths (e.g., sequences of Bezier curves) that best fit the data at different confidence intervals (e.g., 50%, 90%, 99%)? If you can, perhaps a fast and informative plot would be a different colored 3D wireframe for each confidence interval in addition to a plot of the outliers (e.g., 1% of data) using scatter().

As a way to generate simple 3D object files with code instead of interactions with a CAD application’s GUI, I’ve recently started rotating simple polygons that “extrude” (i.e., write to a 3D object file) mesh triangle faces while rotating. It is still early in its development but you can read about the general approach in this 3D Modeling for the Blind essay.

If you had confidence interval paths, it seems like it would be possible to extend “extruding a mesh while rotating” to “extruding a mesh while following a path”.

Thank you for the very informative and quick answer.
Calculating Bezier curves should actually be quite easy (as the many grids follow a magnetic field line). So that is definitely something I will try.

As for the 3D plotting of the off axis cylinder, that is a cool essay. Creating a cylinder object using the basis of the code written in the essay will be simple enough, but I guess my bigger question was moving and rotating a cylinder object so it is off-axis.
If you have an easy answer to that, that would be appreciated! Otherwise, I can just do some research into it when I’ve got the time (currently in finals week so this project won’t be my top priority).

Thanks for the tips.

I haven’t yet done it but, in that essay, I plan to expand the function comment headers to include some examples showing that the first two points in the matrix of coordinates passed to obj_xrotate() define the orientation and location of the cylinder.

That essay generates the cylinder using geometric algebra, which you might already be familiar given that toroids are a common geometry for magnetic confinement. In geometric algebra a 3D toroid is literally a circle times a circle. And a 4D toroid is a circle times a circle times a circle. :*)