\documentclass[margin=10pt,convert]{standalone} \usepackage{asymptote} \begin{document} \begin{asydef} // Global Asymptote definitions real linkLen=1, linkWidth=2pt; real rl=2+linkLen; // distance between beads guide link=(1,0)--(1+linkLen,0); // a link pen beadColor=orange; pen linkColor=beadColor; void bead(transform t){ draw(t*link,linkColor+linkWidth); radialshade(t*unitcircle, beadColor,shift(t)*(-0.4,0.3),0.01 ,black,shift(t)*(-0.4,0.3),1.5); } pair operator>(pair pos=(0,0), real phi){ transform t=shift(pos)*rotate(phi); bead(t); // draw a bead with a link pos+=rl*(Cos(phi),Sin(phi)); // Sin, Cos - in degrees, sin, cos - in radians return pos; }; pair pos; \end{asydef} \begin{asy} size(150,150); beadColor=lightyellow; linkColor=lightblue; pos=pos>90>90>42>0>0>0>0>-130>0>0>-130; label( "Some text here",pos); \end{asy} \end{document}
Source: TeX.SE