# optimization for domain coloring q-series sorts of things

Let’s say you’re interested in plotting a domain colored q-series — for the moment, let that just be a modified theta function, looking something like:

$g(z,q) = \sum_{n=0}^{infty} A(q,n)B(z,n)$

If you’re plotting this with fixed $q$ on the $z\in\mathbb{C}$, $A(q,n)$ is not a function of $z$. Therefore it makes sense to precompute $A(q,n)$ so that one doesn’t increase the runtime unduly.