Geometric linkage

Inspired by [url=https://x.com/KeishiroUeki]@KeishiroUeki[/url][br][url=https://x.com/KeishiroUeki/status/1955079786902241407]https://x.com/KeishiroUeki/status/1955079786902241407[/url]
Script Setup
[code]easingFunc(x) = pi/3*sin(pi/2*cos(x+pi/2))[br]speed = 1[br]t = Slider(0, 2pi, 0.01, speed, 200)[br][br]Ln = 1...6[br]LP = Zip(( cos(k * 2pi/6), sin(k * 2pi/6) ), k, Ln)[br][br]hexBase = Polygon(LP)[br][br]P1 = Rotate(hexBase, easingFunc(t))[br][br]Q1 = Rotate(LP(1), easingFunc(t))[br]Q2 = Rotate(LP(2), easingFunc(t))[br][br]TL1 = Rotate(Polygon(Q2, Q1, 3), -easingFunc(t) *(3/pi) *pi/2+ pi/2 , Q2)[br]TL2 = Rotate(Polygon(Q2, Q1, 3), -easingFunc(t) *(3/pi) *pi/2- pi/2 , Q1)[br][br]LT = Zip(Rotate(TL1, k * 2pi/6), k, Ln)[br][br]VA1 = Vertex( TL1, 1)[br]VA2 = Vertex( TL1, 2)[br]VA3 = Vertex( TL1, 3)[br]VB1 = Vertex( TL2, 1)[br]VB2 = Vertex( TL2, 2)[br]VB3 = Vertex( TL2, 3)[br][br]TL3 = Polygon(VA2, VB1, 3)[br][br]VP1 = Reflect(VB1, Segment(VA2, Vertex(TL3, 3)))[br]VP2 = Reflect(VA2, Segment(VB1, Vertex(TL3, 3)))[br][br]TR1 = Polygon({VA2, VB1, VP2, VP1})[br][br]LTR = Zip(Rotate(TR1, k * 2pi/6), k, Ln)[/code]
Base
Two layers
Four layers
If you enjoy my work, you can support me in [url=https://www.patreon.com/jcponce]Patreon[/url][br][br]Thank! :)

Información: Geometric linkage