# Move Source (disk or sphere) according to time dependent function

**URL:** <https://discourse.paraview.org/t/move-source-disk-or-sphere-according-to-time-dependent-function/2251>\
**Category:** ParaView Support\
**Created:** [July 18, 2019, 6:08pm UTC](https://discourse.paraview.org/t/move-source-disk-or-sphere-according-to-time-dependent-function/2251 "2019-07-18T18:08:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)\
**Post date:** [July 19, 2019, 2:03pm UTC](https://discourse.paraview.org/t/move-source-disk-or-sphere-according-to-time-dependent-function/2251/2 "2019-07-19T14:03:50Z")

</div>

You can do this with some of the animation controls.

Let’s say you add a **Sphere** source. It’s name in the _Pipeline Browser_ will be “Sphere1”. Open up the _Animation View_. In the popup menu to the right of the blue plus sign, select, “Python”, then click the plus sign. In the track to the right of the new animation trick, double-click your mouse. In the “Edit Python Animation Track” dialog that appears, enter this script:

```python
from paraview.simple import *

def start_cue(self): pass

def tick(self):
  tk = GetTimeKeeper()
  t = tk.Time
  center = [t, 0, 0]
  s = FindSource('Sphere1')
  s.Center = center

def end_cue(self): pass

```

This will move the sphere along the _x_-axis according to ParaView’s current time.

---

_[View the full topic](https://discourse.paraview.org/t/move-source-disk-or-sphere-according-to-time-dependent-function/2251)._
