an>
    
    <span class="co"># Use grid::xsplinePoints to draw the curve for each polygon</span>
    <span class="va">xspline_points</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html">lapply</a></span><span class="op">(</span><span class="va">xspline_coords</span>, <span class="fu">grid</span><span class="fu">::</span><span class="va"><a href="https://rdrr.io/r/grid/xsplinePoints.html">xsplinePoints</a></span><span class="op">)</span>
    
    <span class="co