At the risk of stating the obvious, this answer provides a formula for $\vec{d}Q$ and $\vec{r}$. (after writing it i realize its kind of extra-complicated especially compared to Will Orrick's answer of inverting a matrix and, also calculating r directly instead of using n minus Qd but i thought it was an interesting comparison none the less)
Vectors and Wedges
To begin, let us imagine that we consider the situation as vectors. Also note that for two 2d vectors $\vec{a}$ and $\vec{b}$ the Wedge Product is defined as the signed area of parallelogram formed by two vectors, and is calculated as follows
$$\vec{a} \wedge \vec{b} = a_x b_y - a_y b_x $$
Now, let us see if this will appear anywhere while we explore the the equation of $\vec{n}$. Let's write it as follows:
$$\vec{n} = \alpha \vec{u} + \beta \vec{v} $$
where $\alpha$ and $\beta$ are Rational Numbers acting as Scalars for the vectors $\vec{u}$ and $\vec{v}$. Now split it into components.
$$n_x = \alpha u_x + \beta v_x \tag{1}$$
$$n_y = \alpha u_y + \beta v_y \tag{2}$$
Now we can solve the system of two equations with two unknowns, for alpha ($\alpha$) and beta ($\beta$). There are many ways to do this but let us try the following method: Multiply equation 1 by $u_y$ and equation 2 by $u_x$ and we get this:
$$u_y n_x = \alpha u_x u_y + \beta u_y v_x \tag{1a}$$
$$u_x n_y = \alpha u_y u_x + \beta u_x v_y \tag{2a}$$
Now subtract equation 2a from equation 1a
$$ u_y n_x - u_x n_y = \beta ( u_y v_x - v_x u_x ) $$
Notice that $u_y n_x - u_x n_y$ is the Wedge Product of $\vec{n}$ and $\vec{u}$, or in math notation, $\vec{n} \wedge \vec{u} = u_y n_x - u_x n_y$. The same for v and u on the right hand side. We can rewrite the equation for $\beta$ as follows:
$$ \beta = \frac{ \vec{n} \wedge \vec{u}}{ \vec{v} \wedge \vec{u} } $$
If we follow a similar procedure we can solve for alpha
$$ \alpha = \frac{ \vec{n} \wedge \vec{v}}{ \vec{u} \wedge \vec{v} } $$
We shall come back to this later.
Modular Arithmetic on Scalars
Now let's take a new road, and imagine if we introduce modular arithmetic to our rational scalars $\alpha$ and $\beta$ here?
Remember our first equation for $\vec{n}$, with Rational Numbers $\alpha$ and $\beta$
$$\vec{n} = \alpha \vec{u} + \beta \vec{v} $$
Let's change it to highlight the rational nature of $\alpha$ and $\beta$, by saying $\alpha_{num}$ is the numerator of $\alpha$ and $\alpha_{den}$ is the denominator of $\alpha$
$$\vec{n} = \frac{\alpha_{num}}{\alpha_{den}} \vec{u} + \frac{\beta_{num}}{\beta_{den}} \vec{v} $$
Now lets bring in a little computer math. In computer programs it can be common to use integer-rounding division and modular division together to deal with fixed width buffers like pixel screens. Let's try something a little similar here.
Notice that for any rational $\frac{a}{b}$ we can re-write this as follows (where $\small{a \mod\ b}$ is the Modulo division operator, in most computer languages represented as a%b
, signifying the remainder of integer division).
$$\frac{a}{b} = \lfloor \frac{a}{b} \rfloor + \frac{a \mod b}{b}$$
For example
$$\frac{7}{3} = \lfloor \frac{7}{3} \rfloor + \frac{ 7 \mod 3 }{3}$$
$$\frac{7}{3} = 2 + \frac{1}{3}$$
We can do the same with $\frac{\alpha_{num}}{\alpha_{den}}$
$$\frac{\alpha_{num}}{\alpha_{den}} = \lfloor \frac{\alpha_{num}}{\alpha_{den}} \rfloor + \frac{\alpha_{num} \mod \alpha_{den}}{\alpha_{den}}$$
Let's rename the terms to be a little easier to write and introduce $\alpha_q$ and $\alpha_r$
$$\alpha = \frac{\alpha_{num}}{\alpha_{den}} = \alpha_q + \alpha_r$$
where
$$\alpha_q = \lfloor \frac{\alpha_{num}}{\alpha_{den}} \rfloor$$
$$\alpha_r = \frac{\alpha_{num} \mod \alpha_{den}}{\alpha_{den}}$$
What if do the same for beta, and then we plug that back into our equation for $\vec{n}$?
$$ \vec{n} = \alpha \vec{u} + \beta \vec{v} = ( \alpha_q + \alpha_r ) \vec{u} + ( \beta_q + \beta_r ) \vec{v} $$
We can distribute the alphas and betas
$$ \vec{n} = \alpha_q \vec{u} + \alpha_r \vec{u} + \beta_q \vec{v} + \beta_r \vec{v} $$
Now we can begin to see where $\vec{d}Q$ and $\vec{r}$ come from in this vector and wedge view of this world. Recall the original equation - we can equate the $\vec{d}Q$ and $\vec{r}$ to terms in our new written equation, as follows:
$$\vec{n} = \vec{d}Q+\vec{r}$$
$$\vec{d}Q = \alpha_q \vec{u} + \beta_q \vec{v} $$
$$\vec{r} = \alpha_r \vec{u} + \beta_r \vec{v} $$
Put it together
Given $\vec{u}, \vec{v}, \vec{n},$ where $\vec{n} = \vec{d}Q+\vec{r}$, we can calculate $\vec{d}Q$ and $\vec{r}$ as follows
$$\alpha_{num} = \vec{n} \wedge \vec{v}$$
$$\alpha_{den} = \vec{u} \wedge \vec{v}$$
$$\alpha = \frac{\alpha_{num}}{\alpha_{den}} $$
$$\alpha_q = \lfloor \frac{\alpha_{num}}{\alpha_{den}} \rfloor$$
$$\alpha_r = \frac{\alpha_{num} \mod \alpha_{den}}{\alpha_{den}} $$
Follow the same pattern for $\beta$. Then
$$\vec{d}Q = \lfloor \frac{\alpha_{num}}{\alpha_{den}} \rfloor \vec{u} + \lfloor \frac{\beta_{num}}{\beta_{den}} \rfloor \vec{v} $$
$$\vec{r} = \frac{\alpha_{num} \mod \alpha_{den}}{\alpha_{den}} \vec{u} + \frac{\beta_{num} \mod \beta_{den}}{\beta_{den}} \vec{v} $$
If you want to write out all the wedges, we can say this:
$$\vec{d}Q = \lfloor \frac{\vec{n} \wedge \vec{v}} {\vec{u} \wedge \vec{v}} \rfloor \vec{u} + \lfloor \frac{\vec{n} \wedge \vec{u}} {\vec{v} \wedge \vec{u}} \rfloor \vec{v} $$
$$\vec{r} =
\frac{\vec{n} \wedge \vec{v}
\mod \vec{u} \wedge \vec{v}
}{\vec{u} \wedge \vec{v}}
\vec{u} +
\frac{\vec{n} \wedge \vec{u}
\mod \vec{v} \wedge \vec{u}
}{\vec{v} \wedge \vec{u}}
\vec{v} $$
Example Calculations
Perhaps it is useful to note that the Wedge product is the signed area of a parallelogram formed by the two given vectors, so $\vec{u} \wedge \vec{v}$ is simply the negative of $\vec{v} \wedge \vec{u}$ In theory, then, the calculation for d and r could be done with only three wedge-products.
Let's do the basic example
$$ \vec{n} = (3,5), \vec{u} = (2,1), \vec{v} = (-1,2) $$
$$ \vec{n} \wedge \vec{v} = 6--5 = 11 $$
$$ \vec{n} \wedge \vec{u} = 3-10 = -7 $$
$$ \vec{u} \wedge \vec{v} = 4--1 = 5 $$
$$ \vec{v} \wedge \vec{u} = -5 $$
$$ \vec{d}Q = \lfloor \frac{ 11 }{ 5 } \rfloor (2,1) +\lfloor \frac{-7}{-5} \rfloor (-1,2) $$
$$ = (4,2) + (-1,2) = (3,4) $$
$$\vec{r} = \frac{11 \mod 5}{5} (2,1) + \frac{-7\mod -5}{-5} (-1,2)$$
$$ = \frac{1}{5} ( 1(2,1)+2(-1,2) ) = \frac{1}{5}(0,5) = (0,1)$$
Which matches the example.
From this calculation we can see that the "red" grid locations on the original question also have a "remainder" $\vec{r}$ of $(0,1)$ , for example if we move to a different $\vec{n}$ of $(4,3)$:
$$ \vec{n} = (4,3), \vec{u} = (2,1), \vec{v} = (-1,2) $$
$$ \vec{n} \wedge \vec{v} = 8--3 = 11 $$
$$ \vec{n} \wedge \vec{u} = 4-6 = -2 $$
$$ \vec{u} \wedge \vec{v} = 4--1 = 5 $$
$$ \vec{v} \wedge \vec{u} = -5 $$
$$ \vec{d}Q = \lfloor \frac{ 11 }{ 5 } \rfloor (2,1) +\lfloor \frac{-2}{-5} \rfloor (-1,2) = 2(2,1)+0(-1,2)=(4,2) $$
$$ \vec{r} = \frac{11 \mod 5}{5} (2,1) + \frac{-2 \mod -5}{-5} (-1,2) $$
$$ = \frac{1}{5}(2,1) + \frac{-2}{-5}(-1,2) = \frac{1}{5} ( (2,1) + 2(-1,2) ) = (0,1) $$
If we change $\vec{v}$ so that $\vec{u}$ and $\vec{v}$ are no longer square (orthogonal) to each other, we get different values for $\vec{r}$.
For example, $\vec{u} = (2,1), \vec{v} = (1,3)$ results in the following possibilities for $\vec{r}$, which is $P$
$$P = {(0,0), (1,1), (1,2), (2,2), (2,3)}$$
If you draw these out, you will see they are roughly the pixels "inside" the parallelogram created by $\vec{u}=(1,2)$ and $\vec{v}=(1,3)$
Example pictures
Let's look at some pictures to see if this seems like it's working properly. We can do calculations per above, then draw the resulting $\vec{d}Q$s and $\vec{r}$s using python3 and easygraphics.
First let's replicate the original question picture using this algorithm. $\vec{u}$ and $\vec{v}$ are big green, with u+v extended by small green lines, to show the extent of the parallelogram formed by u and v. $\vec{d}Q$ is red, $\vec{r}$ is blue, and $\vec{n}$ is yellow.

Now let us replicate this but we will try sixteen different values for $\vec{n}$, in a grid from 1,1 to 4,4. $\vec{n}$s are omitted for clarity. This seems to be matching the grid patterns in the original question:

If we gather all the values of $\vec{r}$s calculated here, we get $P$, and we can also draw it's values:

These are all inside the parallelogram formed by $\vec{u}$ and $\vec{v}$ and match the original picture.
The next image is the same but with $\vec{u} = (-4,2)$ and $\vec{v} = (1,2)$ and $\vec{n}$ ranging from x = -5 to 1 and y = 0 to 5. The Ps have been drawn in Magenta on top of the r's, and d's.

Now, does it work for "non square" or "not right angle" choices of u and v? (where $\vec{u}$ is not orthogonal to $\vec{v}$). This picture seems to show that it works reasonably well.

It even seems to work pretty well for $\vec{u}$ and $\vec{v}$ in the third quadrant, when all xs and ys are negative.

Tiling of the plane
Turns out these also create tilings of the plane, using a sort of pixellated parallelogram.
With each $\vec{r}$ given it's own color, we get a picture kind of like the first picture in the question

If we make the coloring based on $\vec{d}Q$ we get a covering of Polyominoes

... and a different choice of $\vec{u}$ and $\vec{v}$ gives a different Polyominoe...


As for the hexagonal grid, I am not sure how to do the same there.
And I am not so sure about modular n, it seems to me like any two vectors $\vec{n_1}$ and $\vec{n_2}$ are "congruent" if they both have the same $\vec{r}$. But I'm not sure how to express it.
Hopefully this is a partial answer to the original question.