線與球、平面的交點
Ray與Sphere和Plane的交點,
我參考WIKI的Line-sphere intersection和Line-plane intersection,
這【交點】相當重要,
因為是反射與折射時重要的參考點。
Ray與Sphere和Plane的交點,
我參考WIKI的Line-sphere intersection和Line-plane intersection,
這【交點】相當重要,
因為是反射與折射時重要的參考點。
這次作業最大的難度就在於【反射】與【折射】的【遞迴】實做,
若沒有搞清楚折射和反射的公式,
必然無法做到想要的效果!
以下是我看了「Reflections and Refractions in Raytracing」論文所得到的結論:
3D的時候不好看出結果,
這次使用2D sample點和test點來實做。
HappyMan・迴響