| **Figure 8 motion path**
on Apr 2, 2013 at 5:54:21 pm |

Does anyone know if there is an expression that allows a layer (preferably in 3D space) to move in a figure eight pattern? I'd want this to loop indefinitely as well. I have a path adjusted to do this, but it's not perfectly smooth. Wondering if expressions could help make it perfect?

Fine Art Drawings | Photography | Compositing | VFX | Titles | Keying | 3D | **Re: Figure 8 motion path** on Apr 2, 2013 at 6:39:49 pm |

Try this:

center = [thisComp.width,thisComp.height]/2;

radius = 200;

period = 3;

angle = 2*Math.PI*time/period;

x = 2*radius*Math.cos(angle)*Math.sqrt(Math.cos(angle)*Math.cos(angle));

y = 2*radius*Math.cos(angle)*Math.sin(angle);

center + [x,y]

Dan

| **Re: Figure 8 motion path** on Apr 2, 2013 at 7:03:07 pm |

Thank you SO much, Dan! That did the trick. Now, I'm also looking to make it move in a figure 8 in Z-space as well at the same time. Perhaps I can figure that out based on your expression...

Fine Art Drawings | Photography | Compositing | VFX | Titles | Keying | 3D | **Re: Figure 8 motion path** on Apr 2, 2013 at 7:10:09 pm |

Maybe like this:

center = [thisComp.width/2,thisComp.height/2,0];

radius = 200;

period = 3;

angle = 2*Math.PI*time/period;

x = 2*radius*Math.cos(angle)*Math.sqrt(Math.cos(angle)*Math.cos(angle));

y = 2*radius*Math.cos(angle)*Math.sin(angle);

z = x;

center + [x,y,z]

Dan