|
|
The problem of computing the minimal squared distance between a ray and a triangle is very similar to the one of calculating the distance between a line and a triangle. However the domain for the parameter r of the ray this time is r >= 0. Therefore we get more regions when partitioning the space spanned by (s, t, r) into regions. Consider the following two figures: t t \ 2| | \ | 3n-2n| 3-2 \| | |\ --------|----------- | \ | | \ | 3 | 0 \ 1 3n-0n-1n| 3-0-1 | \ | ---r----------- s --------s----------- r | \ | 4 | 5 \ 6 4n-5n| 4-5 | \ | The first figure shows a cut with the s-t plane and shows the regions we got with line-to-triangle distance calculation. The second figure shows a cut with the t-r plane and shows the new regions we get since the prism that represents region 0 is no longer an infinite prism but only infinite along the positive r-axis where r >= 0. So what we get on the negative r-axis is an exact mirror of the 7 regions of the prism. I'll give those regions the same name as the 7 regions we've had so far, however with the additional letter n for negative.
|
Copyright © by Martin Ecker |