0
$\begingroup$

I have a raytracing exercise similar to this one here: How to get a reflection vector?.

I understand how to do the calculations but I'm having trouble visualising the projections.

enter image description here

The answer is $r=(d-(n\cdot d)n)+(-(n\cdot d)n)=d-2(n\cdot d)n$.

I'm thinking that $\operatorname{proj} nd=(n\cdot d)n$ = the green line and $i$ just end up at $n$.

$\endgroup$
0
$\begingroup$

The key point is that

$$d+r=2(d-(d\cdot n)n)\implies r=d-2(d\cdot n)n$$

enter image description here

$\endgroup$
  • $\begingroup$ @Marcus Sorry I lost a piece. Now it is fixed. $\endgroup$ – gimusi Jul 28 '18 at 20:18
  • $\begingroup$ @Marcus That's the way how I can see it clear. From basic rules for vector summation $d+r$ is the red vector and this one is twice the projection vector of vector $d$ orthogonal to $n$ (we are of course assuming $n$ such that |n|=1). $\endgroup$ – gimusi Jul 28 '18 at 20:19
  • $\begingroup$ Is this the correct way to see it? imgur.com/a/qvRQfxZ Thanks for the help! $\endgroup$ – Marcus Jul 28 '18 at 20:21
  • $\begingroup$ @Marcus Yes, just plot also the $-2\operatorname{proj} nd$ part and apply the parallelogram rule. $\endgroup$ – gimusi Jul 28 '18 at 20:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.