planar)
<span class="kw">library</span>(ggplot2)
<span class="kw">require</span>(reshape2)
<span class="kw">require</span>(plyr)</code></pre></div>
<p>We simulate a thin metal layer sandwiched between glass (incident medium) and air, illuminated from the glass side under p-polarisation, at 44 degrees (Kretschmann configuration). The electric field is normalised by the permittivity of each layer to exemplify the continuity of electric displacement (squared, here) across interfaces.</p>
<div class="sourceCode