<p>$N \cdot L$ is the scalar <em>length</em> of the projection of $L$ on $N$ (assuming $|N|=1$).</p>

<p>$(N \cdot L)N$ is the actual vector with the length of $N \cdot L$ in the direction of $N$.</p>

<p>There is often a confusion when people say "projection of this on that" whether they mean just its length, or the actual vector resulting from the projection. In this case you want to combine it with another vector, so you need the vector version. The correct reflection formula is thus: $$R = 2(N \cdot L)N - L$$</p>

CC BY-SA 3.0
2016-08-25T20:41:08.780Z
Right. Basically I wrote the module instead of the vector. Thank you
Nick
CC BY-SA 3.0
2016-08-25T08:17:44.933Z
2016-08-25T08:17:44.933Z
Nathan Reed
<p>Said L the incoming ray (at a point $P$).  $R$ is the reflected ray. $N$ is the normal to the surface at the point $P$.  $\alpha$ is the angle between $N$ and $L$ (and $N$ and $R$ also). It is assumed a smooth surface (like a plane). $P_{R1}$ is the projection of the vector $R$ on the plane.  $R_2$ is the vector that joins the vector $R$ and $P_{R1}$.
Now you have, </p>

<p>$R= P_{R1} + R_2$  (sum of vectors)</p>

<p>$P_{R1} = -L+R_2$</p>

<p>Thus:
$R=2R_2-L$</p>

<p>Now, exploiting the property of dot product (namely scalar product)</p>

<p>$R_2 = (N\cdot L)/|N|$          (because $R_2$ is $L\cos(\alpha)$ because is the projection of $L$ on $N$)</p>

<p>where $N\cdot L$ is the dot product and $|N|$ is the magnitude (the module) of vector $N$.
 But the vector $N$ is the normal that typically has $|N|=1$
Thus:</p>

<p>$R = 2(N\cdot L)-L$</p>

<p>But my book (3D Computer Graphics, Alan Watt) tells that:</p>

<p>$R_2 = (N\cdot L)N$</p>

<p>Rather for me is:</p>

<p>$R_2=(N\cdot L)/|N| = N\cdot L$    (because $|N|=1$)</p>

<p>I don't understand this point.</p>

CC BY-SA 3.0
2016-08-24T14:51:07.393Z
If R2 is a vector, it _can't_ be equal to NL which is a scalar.
Simon F
<geometry><computational-geometry><mathematics><reflection>
Expressing a reflected ray at a point as a function of the incoming ray and the normal to the surface at that point
Nick
# Expressing a reflected ray at a point as a function of the incoming ray and the normal to the surface at that point

(Asked by: username_0 on 2016-08-24)

Said L the incoming ray (at a point $P$). $R$ is the reflected ray. $N$ is the normal to the surface at the point $P$. $\alpha$ is the angle between $N$ and $L$ (and $N$ and $R$ also). It is assumed a smooth surface (like a plane). $P\_{R1}$ is the projection of the vector $R$ on the plane. $R\_2$ is the vector that joins the vector $R$ and $P\_{R1}$.
Now you have,

$R= P\_{R1} + R\_2$ (sum of vectors)

$P\_{R1} = -L+R\_2$

Thus:
$R=2R\_2-L$

Now, exploiting the property of dot product (namely scalar product)

$R\_2 = (N\cdot L)/|N|$ (because $R\_2$ is $L\cos(\alpha)$ because is the projection of $L$ on $N$)

where $N\cdot L$ is the dot product and $|N|$ is the magnitude (the module) of vector $N$.
But the vector $N$ is the normal that typically has $|N|=1$
Thus:

$R = 2(N\cdot L)-L$

But my book (3D Computer Graphics, Alan Watt) tells that:

$R\_2 = (N\cdot L)N$

Rather for me is:

$R\_2=(N\cdot L)/|N| = N\cdot L$ (because $|N|=1$)

I don't understand this point.

**Tags:** geometry, computational-geometry, mathematics, reflection

> **Comments:**
> **username_1**: If R2 is a vector, it _can't_ be equal to NL which is a scalar.  

---

## 1 answers

### Answer by username_2 on 2016-08-25. Score: 2 | Accepted answer

$N \cdot L$ is the scalar *length* of the projection of $L$ on $N$ (assuming $|N|=1$).

$(N \cdot L)N$ is the actual vector with the length of $N \cdot L$ in the direction of $N$.

There is often a confusion when people say "projection of this on that" whether they mean just its length, or the actual vector resulting from the projection. In this case you want to combine it with another vector, so you need the vector version. The correct reflection formula is thus: $$R = 2(N \cdot L)N - L$$

> **Comments:**
> **username_0**: Right. Basically I wrote the module instead of the vector. Thank you  

---

