ir
front &lt;-<span class="st"> </span><span class="kw"><a href="../reference/invert_stack.html">invert_stack</a></span>(back)

## simulation
M.front &lt;-<span class="st"> </span><span class="kw">do.call</span>(multilayer, front)
M.back &lt;-<span class="st"> </span><span class="kw">do.call</span>(multilayer, back)

<span class="co"># redefine angles to span 0 - 360 degrees</span>
angle &lt;-<span class="st"> </span><span class="kw">c</span>(front$angle +<span class="st"> </span>pi/<span class="dv">2</span