#50 — Mon 22 September 2025 by Evan Chen
So Claude Code actually outputted reasonably good Asymptote code for me today, which is a surprise to me, because usually the LLM's are really bad at Asymptote.
I was trying to convert the following into Asymptote:
\begin{circuitikz}[american]
\node (P) at (0,0) [left] {$P$};
\node (Q) at (13,0) [right] {$Q$};
\draw (P) to[short] (1,0);
\draw (1,0) to[short] (1,1) to[R=$x\,\Omega$] (3,1) to[short] (3,0);
\draw (1,0) to[short] (1,-1) to[R=$\frac{1}{3}\,\Omega$] (3,-1) to[short] (3,0);
\draw (3,0) to[short] (4,0);
\draw (4,0) to[short] (4,1) to[R=$y\,\Omega$] (8,1) to[short] (8,0);
\draw (4,0) to[short] (4,-1) to[R=$\frac{1}{3}\,\Omega$] (6,-1) to[R=$\frac{1}{3}\,\Omega$] (8,-1) to[short] (8,0);
\draw (8,0) to[short] (9,0);
\draw (9,0) to[short] (9,1) to[R=$z\,\Omega$] (11,1) to[short] (11,0);
\draw (9,0) to[short] (9,-1) to[short] (9,-2) to[R=$\frac{1}{3}\,\Omega$] (11,-2) to[short] (11,0);
\draw (9,-1) to[R=$\frac{1}{3}\,\Omega$] (11,-1);
\draw (11,0) to[short] (13,0);
\end{circuitikz}
The output from Claude
actually worked.
Though the most jarring part is probably the presence of import olympiad;
at the top.
A lot of Asymptote users from the AoPS math contest community... it shows.
I cleaned up the output and posted it here.