In After Effects, I created a shape layer, added a path to that, edited the expression of it to contain
var path = thisProperty;
var cx = 100;
var cy = 200;
var r1 = 300;
var ratio = 20;
var quality = 30;
var closedPath = true;
var allPoints = new Array();
for (var a = 0; a < 360; a++) {
var theta = degreesToRadians(a);
x0 = Math.cos(theta);
x = cx + r1 * x0;
y = cy + 0.75 * r1 * (Math.sin(theta) - Math.sqrt(Math.abs(x0)));
allPoints.push([x,y]);
}
path.createPath(allPoints, [], [], closedPath);
and added a stroke and a fill to the shape layer and set the width of the stroke to 10 and the color of the fill to light red. I got this shape as a result.
Now, I want to animate the end point of that stroke, you may see that I am looping the variable a
from 0 to 360. That 360 value represents the end angle of the shape and I would like to have it animated to make an animation that "draws" the heart.
How do I animate the end value?
Is there a way to add a "dummy effect" so I can use it like
var a_max = effect("dummy")("endpoint")