ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Creating a path or shape layer expression for mathematical function

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Josh Lindo
Creating a path or shape layer expression for mathematical function
on Nov 25, 2019 at 3:40:41 pm

Hello,

I need to find a way to draw this (image attached) asymptote as accurately as possible, preferably in a shape layer.

Not really the expression type, pretty basic. This was my first attempt:

In Path of Shape Layers:
t=value[1];
n=value[14];
x= Math.cos(n*t)/t+t;
y=Math.sin(n*t)/t+t;
[x,y]

I will continue trying to figure out a solution in the meantime, but if someone can easily show me how this can be done directly in a shape layer, I'll owe you one.

Thanks



t=value[1];
n=value[14];
x= Math.cos(n*t)/t+t;
y=Math.sin(n*t)/t+t;
[x,y]


Return to posts index

Oleg Pirogov
Re: Creating a path or shape layer expression for mathematical function
on Nov 25, 2019 at 5:22:33 pm

I would do it like this:

1) Make a Null
2) Add this expression to its Position property:

t=time/10;
n=14;
x=100*((Math.cos(n*t)/t)+t);
y=100*((Math.sin(n*t)/t)+t);
[x,y]

3) Convert expression to keyframes:

4) Create a new shape layer with empty path and copypaste Null's Position keyframes to that Path:


Return to posts index

Josh Lindo
Re: Creating a path or shape layer expression for mathematical function
on Nov 25, 2019 at 10:14:46 pm

Brilliant!

Exactly what I needed.

Thank you.

Josh Lindo


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]