View all expressions
Motion

Create Procedural North Star Shape

Mathematically plots a 4-pointed star path with elongated vertical tails. This procedural geometry allows you to create sparkles, gleams, and celestial bodies without manually drawing masks.

Contributed by:


innerRadius = 50;
outerRadius = 300;
points = 4;
pts = [];
for (i = 0; i < points * 2; i++) {
angle = (i / (points * 2)) * Math.PI * 2;
r = (i % 2 === 0) ? outerRadius : innerRadius;
// Add elongated vertical tail for North Star look
if (i === 0 || i === points) r *= 1.5;
x = Math.cos(angle) * r;
y = Math.sin(angle) * r;
pts.push([x, y]);
}
createPath(pts, [], [], true);

Create Procedural North Star Shape

Practical use case

Ideal for creating magical particle systems, nativity scene skies, or highlighting key elements in a motion graphics composition with a stylized "ting" or flash.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image