Why does Mathematica return $Failed
with this function definition?
This function is from an answer in my previous post and it was working well.
I'm using Mathematica 13 on Windows 64 bit.
capacitor[{a1_, a2_}] := Block[{d, l, nd, res, s, t}, d = a2 - a1;
l = Norm[d];
s = a1 (1 - 4.5/9) + a2 4.5/9;
t = a1 (1 - 5/9) + a2 5/9;
nd = l/15 RotationTransform[Pi/2][Normalize[d]];
res = Line[{{s + nd, s - nd}, {t + nd, t - nd}}];
{Thick, Darker[Green], Line[{{a1, s}, {t, a2}}], Brown, res}]