# Issues with multiple orbit "laps" in single animation

**URL:** https://discourse.paraview.org/t/issues-with-multiple-orbit-laps-in-single-animation/11371
**Category:** ParaView Support
**Tags:** python
**Created:** [February 10, 2023, 5:00pm UTC](https://discourse.paraview.org/t/issues-with-multiple-orbit-laps-in-single-animation/11371 "2023-02-10T17:00:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Devin\_Richard\_Bayly](https://discourse.paraview.org/user_avatar/discourse.paraview.org/devin_richard_bayly/32/5533_2.png) [@Devin\_Richard\_Bayly](https://discourse.paraview.org/u/Devin_Richard_Bayly)
#### Post date: [February 10, 2023, 5:00pm UTC](https://discourse.paraview.org/t/issues-with-multiple-orbit-laps-in-single-animation/11371/1 "2023-02-10T17:00:15Z")

</div>

Hi there,

I’m showing growth of a plant as a point cloud and I’d like to provide a full circular camera orbit pass for each recording of the plant. This is different than what I’ve created already which is a single orbit for multiple plant point clouds (different time steps) [rotating.avi - Google Drive](https://drive.google.com/file/d/13UWOxt-QzQqoHxYHWm0no11Il2vGlON4/view?usp=sharing).

I believe this is similar to this question [Multiple camera orbits in Paraview - Stack Overflow](https://stackoverflow.com/questions/52700873/multiple-camera-orbits-in-paraview), but it doesn’t have an answer. I found another post here that recommends manually constructing the orbit paths, but that seems pretty arduous for as many timesteps as I have per plant, and the fact I have a large quantity of plants total ( [Rotation of the camera at a specific speed - #5 by bastiend](https://discourse.paraview.org/t/rotation-of-the-camera-at-a-specific-speed/2841/5) ).

I noticed that I could create another `CameraKeyFrame` and append it to the existing camera, and then I tried to copy the `PositionPathPoints` and other attributes from the previous camera orbit keyframe to the new one. This seems like it would be a good approach to programmatically adding multiple rotations, but when I add the new Keyframe to the camera track it seems like the `KeyTime` starts updating in weird unintuitive ways.

Here’s a video showing the things I’ve tried and hopefully it is simple enough to recreate. [Screencast from 02-10-2023 08:12:38 AM.webm - Google Drive](https://drive.google.com/file/d/19rhdRgWxF4jRVXvxDKwDk2_dTmdmlrDc/view?usp=sharing)

Any suggestions for how to approach this differently?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 13, 2023, 10:01am UTC](https://discourse.paraview.org/t/issues-with-multiple-orbit-laps-in-single-animation/11371/2 "2023-02-13T10:01:22Z")

</div>

Hi @Devin_Richard_Bayly

What is the question here ? I’m not sure to follow what is not working as you expect or what you are not able to achieve.

Best,

---

<div class="post-metadata">

### Author: ![Devin\_Richard\_Bayly](https://discourse.paraview.org/user_avatar/discourse.paraview.org/devin_richard_bayly/32/5533_2.png) [@Devin\_Richard\_Bayly](https://discourse.paraview.org/u/Devin_Richard_Bayly)
#### Post date: [February 13, 2023, 4:58pm UTC](https://discourse.paraview.org/t/issues-with-multiple-orbit-laps-in-single-animation/11371/3 "2023-02-13T16:58:31Z")

</div>

Sorry to be unclear, I also just noticed the video doesn’t seem to be working as a way to showcase the problem. I’ll make sure to update this post by the end of the day.

---

<div class="post-metadata">

### Author: ![Devin\_Richard\_Bayly](https://discourse.paraview.org/user_avatar/discourse.paraview.org/devin_richard_bayly/32/5533_2.png) [@Devin\_Richard\_Bayly](https://discourse.paraview.org/u/Devin_Richard_Bayly)
#### Post date: [February 13, 2023, 5:32pm UTC](https://discourse.paraview.org/t/issues-with-multiple-orbit-laps-in-single-animation/11371/4 "2023-02-13T17:32:32Z")

</div>

Well, I’m not sure about the bug I was encountering but I just had some luck with this script. Perhaps we can close the books on this and I’ll suggest my script on the stack overflow link mentioned above.

```auto
from paraview.simple import *

anim = GetAnimationScene()
renderView1 = GetActiveViewOrCreate("RenderView")
cameraAnimationCue1 = CameraAnimationCue()
#cameraAnimationCue1 = GetCameraTrack(view=rv)
cameraAnimationCue1.Mode = 'Path-based'
cameraAnimationCue1.AnimatedProxy = renderView1
# create a new key frame
n = 3 
for i in range(n):
    keyFrameN = CameraKeyFrame()
    keyFrameN.Position = [-6.6921304299024635, 0.0, 0.0]
    keyFrameN.FocalPoint = [1e-20, 0.0, 0.0]
    keyFrameN.ViewUp = [0.0, 0.0, 1.0]
    keyFrameN.ParallelScale = 1.7320508075688772
    keyFrameN.PositionPathPoints = [0.0, -5.0, 0.0, 2.938926261462365, -4.045084971874736, 0.0, 4.755282581475766, -1.545084971874737, 0.0, 4.755282581475766, 1.5450849718747361, 0.0, 2.938926261462365, 4.045084971874735, 0.0, 1.3322676295501878e-15, 4.9999999999999964, 0.0, -2.9389262614623624, 4.045084971874735, 0.0, -4.755282581475763, 1.5450849718747368, 0.0, -4.755282581475763, -1.5450849718747341, 0.0, -2.9389262614623632, -4.045084971874731, 0.0]
    keyFrameN.FocalPathPoints = [0.0, 0.0, 0.0]
    keyFrameN.ClosedPositionPath = 1 
    keyFrameN.KeyTime = i/n 
    cameraAnimationCue1.KeyFrames.append(keyFrameN)

# ending scale
keyFrame9333 = CameraKeyFrame()
keyFrame9333.KeyTime = 1.0 
keyFrame9333.Position = [-6.6921304299024635, 0.0, 0.0]
keyFrame9333.FocalPoint = [1e-20, 0.0, 0.0]
keyFrame9333.ViewUp = [0.0, 0.0, 1.0]
keyFrame9333.ParallelScale = 1.7320508075688772

# initialize the animation track
cameraAnimationCue1.KeyFrames.append( keyFrame9333)
anim.Cues.append(cameraAnimationCue1)

```

Put simply I was running into an issue with the keytimes getting overwritten, but I can’t recreate that anymore.
