As I understand the question, we have a plane $P$ in $\Bbb{R}^3$, and we wish to compute the projection of a point $x \in \Bbb{R}^3$ onto the set $P \cap \Bbb{Z}^3$.
The first thing to do is find a normal vector $n = (n_1, n_2, n_3) \neq 0$ to $P$, i.e. $P$ is the set of vectors perpendicular to $n$. Compute the dimension of the set $\operatorname{span}_\Bbb{Q}\{n_1, n_2, n_3\}$ as a vector space over $\Bbb{Q}$.
Since $n \neq 0$ the dimension is at least $1$. If the dimension is $3$, then $P \cap \Bbb{Z}^3 = \{(0, 0, 0)\}$, and the projection is constantly $(0, 0, 0)$. If the dimension is $2$, then $P \cap \Bbb{Z}$ consists of a equally spaced points along a line, which is easy enough to work with (project onto the line, and round to the nearest point). Otherwise, the dimension is $1$, which is the trickiest case.
In this case $n_1, n_2, n_3$ are rational multiples of the same number $k$. By scaling $n$ as necessary, we may assume that $n_1, n_2, n_3$ are all integers, whose gcd is $1$.
We are now trying to solve a homogeneous linear diophantine equation in three variables. Specifically, we need to find integer solutions $(x_1, x_2, x_3)$ to
$$n_1 x_1 + n_2 x_2 + n_3 x_3 = 0.$$
Solving this yields solutions in two integer parameters $a$ and $b$, which will reduce to the form $x = (x_1, x_2, x_3) = ay + bz$, where $y, z \in \Bbb{Z}^3$. In particular, this gives us a lattice of points, though no longer rectangular.
So, we have reduced the problem down to projecting onto points with integer coordinates in a basis $B = (y, z)$ that is (typically) not orthonormal. I suggest following the following procedure:
- Compute the projection $p$ of a point $x$ onto $P$,
- Compute the coordinates $(a, b)$ of $p$ with respect to the basis $B$,
- Compute the distance from $x$ to the (typcially) four points of the form $a'y + b'z$, where $a' \in \{\lfloor a \rfloor, \lceil a \rceil \}$ and $b' \in \{\lfloor b \rfloor, \lceil b \rceil \}$, and
- Return the point out of the previous $4$ points which is closest.
This might be a useful approach to consider.
Given the following form:
$$
A\mathbf{x}=\mathbf{b}
$$
where $A$ is $m \times n$, $\mathbf{x}$ is $n \times 1$, and $\mathbf{b}$ is $m \times 1$, then projection matrix $P$ which projects onto the subspace spanned by the columns of $A$, which are assumed to be linearly independent, is given by:
$$
P=A\left(A^{T}A\right)^{-1}A^{T}
$$
which would then be applied to $\mathbf{b}$ as in:
$$
\mathbf{p}=P\mathbf{b}
$$
In the case you are describing, the columns of $A$ would be the vectors which span the null-space that you have separately computed, and $\mathbf{b}$ is the vector $\vec{V}$ that you wish to project onto the null-space.
I hope this helps.
Best Answer
Yes. Because the projection of $\mathbf b$ is not onto $\mathbf a$ but on the direction of $\mathbf a$ ( you can also think to an angle $\theta >90°$).