矢量方向方程
我在 3D 空间中有三个向量,一个是光源,一个是光线,一个是光线击中的圆上的点。有了这些信息,我如何计算出从光线撞击圆的点指向光源的矢量?
I have three vectors in 3D space, one is a light source, one is a ray and one is the point on a circle a ray hits. With this information, how can I work out the vector which points back at the light source from the point the ray hits the circle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你真正拥有的是两个点(光源,圆交点),以及它们之间的向量,对吧?该向量已经由两点隐含——它是交点坐标减去光源坐标。要反转它,只需将向量的所有坐标取反即可!
What you really have is two points (light source, circle intersection), and a vector between them, right? The vector is already implied by the two points -- it's the intersection coordinates minus light source coordinations. To reverse it, just negate all the coordinates of the vector!