user21523: 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")


user4426: 
Press the triangle marked "Add" next to the Contents of your shape layer.
Add a "trim path"
Add a keyframe to the "End" parameter of 0%.
Move along your timeline.
Add another keyframe of 100%.

Your path will draw on.
You probably don't want to fill it until it is drawn.


21523: <p>In After Effects, I created a shape layer, added a path to that, edited the expression of it to contain</p>
<pre class="lang-js prettyprint-override"><code>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 &lt; 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);
</code></pre>
<p>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.</p>
<p><a href="https://i.stack.imgur.com/p6uAS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p6uAS.png" alt="heart" /></a></p>
<p>Now, I want to animate the end point of that stroke, you may see that I am looping the variable <code>a</code> 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 &quot;draws&quot; the heart.</p>
<p>How do I animate the end value?</p>
<p>Is there a way to add a &quot;dummy effect&quot; so I can use it like</p>
<pre><code>var a_max = effect(&quot;dummy&quot;)(&quot;endpoint&quot;)
</code></pre>
 4426: <ol>
<li>Press the triangle marked &quot;Add&quot; next to the Contents of your shape layer.</li>
<li>Add a &quot;trim path&quot;</li>
<li>Add a keyframe to the &quot;End&quot; parameter of 0%.</li>
<li>Move along your timeline.</li>
<li>Add another keyframe of 100%.</li>
</ol>
<p>Your path will draw on.
You probably don't want to fill it until it is drawn.
<a href="https://i.stack.imgur.com/iTMkk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iTMkk.png" alt="grab" /></a></p>
