I am looking for a function with the following property:


Let $v\_1,v\_2$ be two linearly independent vectors in $\mathbb{R}^2.$


I am given a smooth function $g:(0,1) \rightarrow (0,\infty).$


I am trying to understand if there exists a smooth (non-constant) function $f:(0,1) \times \mathbb R^2 \rightarrow \mathbb R^2$ with the property that for all $n,m \in \mathbb Z$ such that $g(t)=n/m$, where $n/m$ is a reduced fraction, we have for all $x \in \mathbb R^2$


$$f(t,mv\_1+x)=f(t,x)=f(t,nv\_2+x)$$ and $n,m$ are the minimal periods of the function $f$, i.e. for all natural numbers $1\le n\_0 <n$ we do not have


$$f(t,nv\_2+x)=f(t,x)$$ and the same for $m.$



Does such a function exist?
Define $f(t,x\mathbf v\_1+y\mathbf v\_2)=e^{2\pi i(x/g(t)+yg(t))}$.
Then $f(t,\mathbf x+j\mathbf v\_1)=e^{2\pi ij/g(t)}f(t,\mathbf x)$ and similarly $f(t,\mathbf y+k\mathbf v\_2)=e^{2\pi ikg(t)}f(t,\mathbf x)$.


Suppose $t$ is such that $g(t)=\frac nm$ (in lowest terms). Then $f(t,\mathbf x+j\mathbf v\_1)=e^{2\pi ijm/n}f(t,\mathbf x)$ so that $f(t,\cdot)$ is $j\mathbf v\_1$-periodic if and only if $n|jm$ if and only if $n|j$. Similarly $f(t,\mathbf x+k\mathbf v\_2)=e^{2\pi ikn/m}$, so that $f(t,\cdot)$ is $k\mathbf v\_2$-periodic if and only if $m|k$.


