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

**URL:** <https://discourse.julialang.org/t/makie-jl-travelling-through-an-attractor-or-axis3/67936>\
**Category:** Visualization\
**Tags:** question, makie\
**Created:** [September 9, 2021, 1:42pm UTC](https://discourse.julialang.org/t/makie-jl-travelling-through-an-attractor-or-axis3/67936 "2021-09-09T13:42:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [September 9, 2021, 1:42pm UTC](https://discourse.julialang.org/t/makie-jl-travelling-through-an-attractor-or-axis3/67936/1 "2021-09-09T13:42:10Z")

</div>

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

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/2/f26683640afb759876656d270d496cd1c5dc54b3.png)

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…?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 9, 2021, 1:44pm UTC](https://discourse.julialang.org/t/makie-jl-travelling-through-an-attractor-or-axis3/67936/2 "2021-09-09T13:44:54Z")

</div>

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 🙂 But in a normal Scene you can do anything you want with your camera, fly around, etc.

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [September 9, 2021, 1:47pm UTC](https://discourse.julialang.org/t/makie-jl-travelling-through-an-attractor-or-axis3/67936/3 "2021-09-09T13:47:34Z")

</div>

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”?

---

<div class="post-metadata">

**Author:** ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Post date:** [September 9, 2021, 1:54pm UTC](https://discourse.julialang.org/t/makie-jl-travelling-through-an-attractor-or-axis3/67936/4 "2021-09-09T13:54:54Z")

</div>

That should just be something like

```julia
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).

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [September 9, 2021, 4:18pm UTC](https://discourse.julialang.org/t/makie-jl-travelling-through-an-attractor-or-axis3/67936/5 "2021-09-09T16:18:34Z")

</div>

Please do show your result!
