# Tutorial 95: Fluid Motion

## Joe Clay | Nov 3, 2017

In this week's tutorial we take a look back at two of our first few tutorials—Tutorial 02: Radial Delay and Tutorial 03: Blobs—in order to simulate what's going on in a shot on Dribbble by Alexander Pyatkov for Motion Design School called Telegram Logo Animation.

This concept can be done in other ways—you could probably do it with Time Displacement for example—but since we can add additional code this example can be pretty powerful. For example, you can have different sized circles and use their size to assign a mass, and thus have some move more slowly due to inertia. Or you could code in a movable point to determine where the delay comes from. There's a lot that can be done. As most of our tutorials go, this is just showing the idea of a technique—using delays to simulate a fluid motion.

If you want to get closer to the example, you might want to use this as a reference for animating shape paths, or for drawing frames. There's a lot of possibilities to using delays with blobbed objects in this fashion, so download the project file below and send @workbench_tv some gifs!

Here's the code used in the project if you want to build your own. Add Linear Delay the position property on all of your component layers.

```
//Linear Delay
delay = -thisComp.layer("Controller").effect("Delay")("Slider"); //in seconds
x = Math.pow(value[0],2);
y = Math.pow(value[1],2);
d = Math.sqrt(x+y);
t = time + linear(d,0,2203,0,delay);
value+(thisComp.layer("Controller").transform.position.valueAtTime(t)-[960,540]);
```

Add Inertial Bounce 2 to the controller's movement so that everything bounces back into place.

```
//Inertial Bounce 2
amp = .1;
freq = 2.0;
decay = 2.0;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}}
if (n == 0){ t = 0;
}else{
t = time - key(n).time;
}
if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}
```

If you'd like to help support Workbench, check out my Patreon page. Thank you for even considering clicking this link to support what I'm doing. I appreciate it.

Feel free to download the project file that you can use in your own projects!