Evgeny.Makarov said:
Let $\pi$ be the plane with normal $n$ and let $\text{proj}_\pi(u,v)$ be the projection of $u$ along $v$ on $\pi$. Obviously, $\text{proj}_\pi(u,v)$ is uniquely defined iff $v$ is not parallel to $\pi$. I am not so much interested in proving $\text{proj}_\pi(u,v)=(v\times u)\times n$ for all vectors $u$, $v$ and $n$. I'd like to prove this equality provided both sides are defined. In a similar way, $\dfrac{x}{y}\cdot y=x$ is also false in general, but it is still useful.
First, $(v\times u)\times n$ is perpendicular to $n$ and therefore lies in $\pi$. Also, $v\times u$ is perpendicular to the plane defined by $v$ and $u$, so $(v\times u)\times n$ lies in that plane, i.e., it equals $\mu u+\lambda v$ for some $\mu$ and $\lambda$. So it is a projection of some vector proportional to $u$ if not $u$ itself, i.e., it has the correct direction. (In fact, I plan to apply this to projective geometry, so only directions matter in the end.) But I still would like to know if $(v\times u)\times n$ has the right magnitude.
It has the wrong magnitude.
Let me clarify. Suppose $v$ is 'nearly' in $\pi$, then the projection vector has near-infinite length.
However, the magnitude of $(v\times u)\times n$ is bounded by the product of the individual magnitudes.
Evgeny.Makarov said:
Yes, thank you, and I have a question about this as well.
Wikipedia shows that $p=u-(u\cdot n)v$ (this is case (S3) in the link above, where our $u$ is denoted by $p$ and its projection is $p'$) leads to the formula $p=(I-vn^T)u$ where vectors are viewed as columns and $A^T$ is matrix transpose, so $vn^T$ is a $3\times 3$ matrix. So the matrix of projection is $I-vn^T$. What I don't understand is where the denominator $v\cdot n$ from your formula went. Case (S1) assumes that $v\cdot n=1$; does this assumption apply to (S3) as well? But I have the book "Projective Geometry and Its Applications to Computer Graphics" by M.A. Penna and R.R. Pattersons, which says on page 113 that the matrix is indeed like this without assuming $v\cdot n=1$. Granted, matrices of projective transformations are defined up to a multiplicative constant, but here we have the identity matrix that is added and not just $vn^T$.
I don't have that book, but I can guess what they did.
In computer graphics we want to do such a projection on a 'lot' of points, so it must be as computationally cheap as possible.
Generally, we pick $\|n\|=1$ in 'normal' orthogonal projections, which rids us from the division by $n\cdot n$ that we would otherwise have to do. Not to mention that it simplifies the projection formula.
In this case we want $v\cdot n=1$, meaning we will resize $v$ such that this is the case.
Generally that means the $\|v\|>1$.
The book would probably explain in some introductory section that $n$ and/or $v$ are 'suitably' picked or resized, and that this is assumed in the remainder of the book.
Anyway, looking at S3 on wikipedia, I believe that they forgot to mention that they indeed picked $v\cdot n=1$, making S3 a further specialization of S1.
As for the construction of the matrix, note that:
$$(vn^T)p = v(n^Tp)=v(p\cdot n) = (p\cdot n)v$$