numsegments = Math.max(2, Math.floor(effect(1)(1)));
totallength = Math.max(0.001, effect(2)(1));
seglength = totallength / numsegments;
sepdist = Math.max(0.001, effect(3)(1) * 0.5) / (Math.PI * 2);
roll = clamp(effect(4)(1)/100, 0, 1);
pos = [0, 0];
cv = [];
firsttheta = Math.sqrt(numsegments * seglength / sepdist);
f = numsegments;
for(i=0; i<numsegments; i++)
{
u = (i - 1) / numsegments;
u = linear(u, roll, 1, 0, numsegments);
f -= clamp(u, 0, 1);
theta = Math.sqrt(f * seglength / sepdist);
theta -= firsttheta;
if(i != 0)
{
x = Math.cos(theta) * seglength;
y = Math.sin(theta) * seglength;
pos += [x, y];
}
cv.push(pos);
}
createPath(cv, [], [], false);
添加在空白形状图层的路径上,然后添加图层效果 表达式控制 滑块控制器 一共四个