How to find reflection vector when the object doesn't sit on an axis?

泄露秘密 提交于 2020-01-16 19:31:30

问题


How do I calculate the reflection vector to this problem? Using the formula r = v - 2 (v.n)n I can get the reflection when the object is sat on the x or y axis however when using this formula when it isnt seems to give strange results. Any help would be greatly appreciated.

Example of the problem


回答1:


The normal vector n needs to be normalized.

In your example, n should be (1/sqrt(2), 1/sqrt(2)).



来源:https://stackoverflow.com/questions/58699100/how-to-find-reflection-vector-when-the-object-doesnt-sit-on-an-axis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!