Let $M \subset \mathbb R^2$ be a lattice of rank $2$ given by a basis $b_1,b_2\in \mathbb R^2$. So $M = \mathbb Z b_1 +\mathbb Z b_2$. I'm looking for an algorithm which computes every lattice point in a rectangular region $[a,b] \times [c,d]$. So we are interested in the finite set $M \cap ([a,b] \times [c,d])$.
In case $b_1 = (r_1,0)$ and $b_2 = (0,r_2)$ for $r_1,r_2 \in \mathbb R$ that would be quite simple. But my basis is of course not in that form (in fact for my lattices there is no basis of that form since $(0,0) \in M$ is the only lattice point with a zero in a coordinate).
Do you have ideas how to proceed? I guess I should transform my basis somehow into a basis which is more suitable. But what does more suitable mean in this situation and how can I do that?
Let $m=(m_1,m_2)\in M$. You can represent $m=(m_1b_{11}+m_2b_{21}, m_2b_{12}+m_2b_{22})\in\mathbb R^2$. Now proceed to find all pairs $(m_1,m_2)\in\mathbb Z^2$.