Треугольное треугольное пересечение в 3-м Пространстве

Я соглашаюсь с Jon, и просто для уточнения это выглядело бы примерно так:

static Regex regex = new Regex("regex", RegexOptions.Compiled);

также worthwile для рассмотрения RegexOptions перечисление для других флагов, которые могут время от времени быть полезными.

8
задан πάντα ῥεῖ 12 July 2018 в 17:44
поделиться

2 ответа

В этом документе описывается одна реализация:

http://knight.temple.edu/~lakaemper/courses/cis350_2004/etc/moeller_triangle.pdf

Обратите внимание, что существуют разные методы в зависимости от того, хотите ли вы узнать точку / сегмент, где произошло пересечение, или просто узнать, произошло ли пересечение. Этот документ даст вам отрезок прямой, представляющий пересечение.

4
ответ дан 5 December 2019 в 15:25
поделиться

There's a good paper by Devillers et al with the title "Faster Triangle-Triangle Intersection Tests" -- (yes, did a google search, but the search keywords are important...)

Anyway, their point (compared to the Moeller paper in MichaelM's answer) is that you really should get your combinatorial information by doing determinants of selected groups of 4 points (the paper describes how). This avoids computing intermediate values that can be problematically inconsistent, and which probably won't actually be any faster...

You can look at these determinants as figuring out whether the tetrahedron formed by the 4 points is right-handed, left-handed, or degenerate (i.e., planar). This value also determines whether any one of the 4 points is on one side or the other of the plane formed by the other three, and whether the (directed) line formed by any two of the 4 is on one side or the other of the line formed by the other two.

To make a long story short, doing the determinant thing makes your math more robust, and if you pay attention, you can usually convert algorithms that didn't initially do the determinant thing into ones that do. Or, you could just read the paper.

3
ответ дан 5 December 2019 в 15:25
поделиться
Другие вопросы по тегам:

Похожие вопросы: