Makie.jl: travelling through an attractor (or Axis3)

Hi,
I have a 3d line plot that looks as follows:

I know the ax.azimuth and ax.elevation I need to set to end up in this orientation.

What I want to do now is somehow (no idea how!) animate the camera going through this hole you see in the middle, somehow traveling inside and through the data and the lines.

Is this possible to achieve with Makie.jl…?

Axis3 is specifically written to always have the full axis in view when you rotate around, so this idea goes directly against how it’s built :slight_smile: But in a normal Scene you can do anything you want with your camera, fly around, etc.

1 Like

Sounds good thanks. So I replace ax = Axis3... with ax = Scene(). Just tested and it works, that’s great.

Anyone knows how do I animate the “camera” travelling through a straight line? I have the equations for the line I want (.e.g the orientation vector and the initial point on the line). How do I actually “change the camera programmatically”?

That should just be something like

path = Point2f0[...]
cam = cameracontrols(lscene.scene) # or scene if you use one directly
viewdir = cam.lookat[] - cam.eyeposition[]
for p in path
    update_cam!(lscene.scene, cam, p, p + viewdir)
    sleep(1/30)
end

If you want to rotate the camera as well you can adjust lookat (i.e. the last argument in update_cam!) and up (additional argument).

2 Likes

Please do show your result!

3 Likes