The leg of a steampunk automatonLa gamba di un automa steampunk

A crank drives a four-bar linkage, and a point fixed on its middle bar, the foot, traces a closed curve at every turn; the seven dimensions of the linkage are searched in the browser so that this curve follows a target curve, picked from a list or drawn by hand, as in the computational design of mechanical characters of Coros, Thomaszewski et al. (2013). Their system builds a whole character, with a mechanism for each moving part joined by gear trains to one crank; this scene builds one of those mechanisms, a walking leg (the second leg, shown faint, is the same linkage half a turn later on the same crank), and prints it as flat parts joined by pins.

Una manovella muove un quadrilatero articolato, e un punto fissato sulla sua barra di mezzo, il piede, descrive una curva chiusa a ogni giro; le sette dimensioni del meccanismo sono cercate nel browser in modo che questa curva segua una curva obiettivo, scelta da un elenco o disegnata a mano, come nel progetto computazionale di personaggi meccanici di Coros, Thomaszewski e altri (2013). Il loro sistema costruisce un personaggio intero, con un meccanismo per ogni parte che si muove, collegato a un'unica manovella da ingranaggi; questa scena costruisce uno di quei meccanismi, una gamba che cammina (la seconda gamba, in trasparenza, è lo stesso meccanismo mezzo giro dopo sulla stessa manovella), e lo stampa come pezzi piatti uniti da perni.

The target in dashed gold, the curve of the foot in violet, the crank in violet at OA, the rocker turning about OB.L'obiettivo tratteggiato in oro, la curva del piede in viola, la manovella in viola in OA, il bilanciere che ruota attorno a OB.

The linkage and its searchIl meccanismo e la sua ricerca

With the crank pivot OA at the origin, the crank of length r1 at angle θ puts the joint A at r1(cos θ, sin θ); the joint B is where the circle of radius r2 about A (the coupler) meets the circle of radius r3 about the fixed pivot OB (the rocker), taking the same one of the two intersections for the whole turn; and the foot is P = A + u e + v n, with e the unit vector from A to B and n its normal. The unknowns are then x = (r1, r2, r3, OB, u, v), seven numbers. The cost is the mean squared distance of 72 positions of the foot from the target curve plus that of 64 points of the target from the curve of the foot (a symmetric chamfer distance, which does not ask the foot to be at a given point at a given angle), to which penalties are added where the two circles do not meet (the linkage cannot close), where a link is shorter than 12 mm or longer than 100 mm, and where a link of one layer hits a pin of another (below).

Con il perno della manovella OA nell'origine, la manovella di lunghezza r1 all'angolo θ porta il giunto A in r1(cos θ, sin θ); il giunto B sta dove la circonferenza di raggio r2 attorno ad A (la biella) incontra quella di raggio r3 attorno al perno fisso OB (il bilanciere), prendendo per tutto il giro la stessa delle due intersezioni; e il piede è P = A + u e + v n, con e il versore da A a B e n la sua normale. Le incognite sono allora x = (r1, r2, r3, OB, u, v), sette numeri. Il costo è la distanza quadratica media di 72 posizioni del piede dalla curva obiettivo più quella di 64 punti dell'obiettivo dalla curva del piede (una distanza di chamfer simmetrica, che non chiede al piede di trovarsi in un punto dato a un angolo dato), a cui si aggiungono penalità dove le due circonferenze non si incontrano (il meccanismo non si chiude), dove una barra è più corta di 12 mm o più lunga di 100 mm, e dove una barra di uno strato urta un perno di un altro (più sotto).

The minimiser is the simplex method of Nelder and Mead (1965), which needs no derivatives, from six starting linkages that close in every position (crank-rockers in the sense of Grashof: the crank is the shortest bar, and the shortest plus the longest of the four lengths, the ground OAOB included, do not exceed the sum of the other two), with the foot placed at the centre of the target; each start runs 800 iterations, 25 per frame, and the best linkage of all is kept. The cost is not convex and has many local minima, so that two runs from different starts may end on different linkages; the figure eight, which a four-bar can trace only with a coupler point far from its bars, is the hardest of the list. Coros et al. fit the curves by a continuous optimisation of the same kind, after a search over a catalogue of mechanism types; here the type is fixed.

Il minimizzatore è il metodo del simplesso di Nelder e Mead (1965), che non usa derivate, da sei meccanismi di partenza che si chiudono in ogni posizione (manovella-bilanciere nel senso di Grashof: la manovella è la barra più corta, e la più corta più la più lunga delle quattro lunghezze, il telaio OAOB compreso, non superano la somma delle altre due), con il piede messo al centro dell'obiettivo; ogni partenza fa 800 iterazioni, 25 per fotogramma, e si tiene il miglior meccanismo di tutti. Il costo non è convesso e ha molti minimi locali, così che due corse da partenze diverse possono finire su meccanismi diversi; l'otto, che un quadrilatero articolato descrive solo con un punto di biella lontano dalle sue barre, è il più difficile dell'elenco. Coros e gli altri adattano le curve con un'ottimizzazione continua dello stesso tipo, dopo una ricerca in un catalogo di tipi di meccanismo; qui il tipo è fisso.

Download for 3D printingScarica per la stampa 3D

A 3D print of this legUna stampa 3D di questa gamba

The parts lie flat on the bed: the frame, with two holes to fix it to a box or a wall; the crank with its axle; the handle that fits on the axle behind the frame; the coupler with the foot; the rocker; a spacer; and three pins with heads. The plates are 3 mm thick and stacked in four layers 0.4 mm apart: the frame, the crank, the coupler, the rocker. The pin of A is a press fit in the crank and free in the coupler, that of B a press fit in the coupler and free in the rocker, that of OB a press fit in the frame, through the spacer, and free in the rocker; the axle is free in the frame and a press fit in the handle. Press-fit holes are drawn at the radius of the pin (1.5 mm; 2.5 mm for the axle), free holes larger by the clearance below (0.2 to 0.3 mm, 0.25 by default); printers that print holes small may need a drill. The search keeps the crank and the coupler clear of the spacer and the rocker clear of the head of the pin of A over the whole turn, with 1 mm to spare. The scale changes the lengths of the linkage, not the pins and the plates.

I pezzi stanno piatti sul piatto: il telaio, con due fori per fissarlo a una scatola o a un muro; la manovella con il suo asse; la maniglia che si infila sull'asse dietro al telaio; la biella con il piede; il bilanciere; un distanziale; e tre perni con la testa. Le piastre sono spesse 3 mm e impilate in quattro strati distanti 0.4 mm: il telaio, la manovella, la biella, il bilanciere. Il perno di A è forzato nella manovella e libero nella biella, quello di B forzato nella biella e libero nel bilanciere, quello di OB forzato nel telaio, attraverso il distanziale, e libero nel bilanciere; l'asse è libero nel telaio e forzato nella maniglia. I fori forzati sono disegnati al raggio del perno (1.5 mm; 2.5 mm per l'asse), quelli liberi più larghi del gioco qui sotto (da 0.2 a 0.3 mm, 0.25 come default); con stampanti che fanno i fori piccoli può servire un trapano. La ricerca tiene la manovella e la biella lontane dal distanziale, e il bilanciere lontano dalla testa del perno di A, per tutto il giro, con 1 mm di margine. La scala cambia le lunghezze del meccanismo, non i perni e le piastre.