一、建立母版方形
如新建一个1000*1000的正方形,并给它加一个角度控制表达式
二、表达式迭代
复制刚才的形状层 1.在size属性添加表达式
siz_last = thisComp.layer(thisLayer.index-1).content(Rectangle 1).content(Rectangle Path 1).size;
ang = degreesToRadians(transform.rotation-thisComp.layer(thisLayer.index-1).transform.rotation);
tra = 1 /(Math.cos(ang)+Math.sin(ang));
tra*siz_last
2.在旋转(rotation)属性添加表达式
thisComp.layer(Shape Layer 1).effect(Angle Control)(Angle)+thisComp.layer(thisLayer.index-1).transform.rotation;
三、疯狂复制(完成)
! 注意
母版图层必须放第一层,且必须是正方形。 角度尺寸都可以随便调。 中英名称问题,请自行更改
原理与表达式解析
第一句:找到上一个形状的尺寸
siz_last = thisComp.layer(thisLayer.index-1).content(Rectangle 1).content(Rectangle Path 1).size;
siz_last :代表上一个正方形的尺寸(第一个母版就是1000*1000)
thisLayer.index-1:index是图层序号,这句话就是当前图层序号-1,也就是上一个图层的图层序号
thisComp.layer(XXX):引用图层
.content.content(Rectangle Path 1).size:引用该形状的size
第二句:把旋转的角度改为弧度制
ang = degreesToRadians(transform.rotation-thisComp.layer(thisLayer.index-1).transform.rotation);
第三句:计算新形状的size
根据公式:C = L/(sinΘ+cosΘ) tra = 1 /(Math.cos(ang)+Math.sin(ang)); tra*siz_last ## 其他说明
如果是向外扩散的话,更改一个数据即可 tra = Math.cos(ang)+Math.sin(ang);
看不懂呃呃