【发布时间】:2015-03-20 19:04:27
【问题描述】:
我正在尝试让锥形图元在我的光线追踪器中工作。我得到了锥体和射线工作的交叉点。但是,我不知道如何从定义锥体的方式中获得锥体的法线。 我用以下内容定义我的锥体:
pos -- The vertex of the cone
size -- Height of the cone
direction -- A unit vector that defines the direction of the cone
angle -- The angle of the cone
(有关更多信息,我遵循了Intersection of line and Cone 作为其定义方式的参考)。
据我所知,我可以使用two tangents of a point with the parametric eqn,并使用他们的叉积得到正常。但是,鉴于我定义圆锥的方式,以及参数 eqn 的两条切线,我不知道如何获得参数 eqn。
如果有另一种方法可以找到很好的法线。
【问题讨论】:
标签: graphics