-
Bezier curve made from four null layers
I found exactly what I need at Dan Ebberts’ AE expressionslab.
The thing is I can use it as is but I’d like to understand what’s going on in the formula.Can someone give some insight on the inner workings of this formula?
It is probably derived from an excisting math-formula (like the abc)
A link to the math itself would be sufficient also…// Dans’ code;
N1 = thisComp.layer(“Null 1”);
N2 = thisComp.layer(“Null 2”);
N3 = thisComp.layer(“Null 3”);
N4 = thisComp.layer(“Null 4”);p0 = N1.position;
p1 = N2.toWorld(N2.anchorPoint);
p2 = N3.toWorld(N3.anchorPoint);
p3 = N4.position;c = 3*(p1 – p0);
b = 3*(p2 – p1) – c;
a = p3 – p0 – c – b;t = index/(thisComp.numLayers – 3);
((a*t +b )*t + c)*t + p0 // THIS IS WHAT I’M TALKING ABOUTTHNX in advance. And Dan… A big thanks for the bezier-curve script, superb!
PS: My use for this expression is a plant like object made out of segments. The fact that the segments stick to the beziercurve makes it possible to move the curve in 3Dspace. VERY NICE !
Unlike the snake and follow setups where the leader needs to be in constant motion to avoid the slaves/followers from catchingup. And you can’t animate that curve… only follow it.