English 中文(简体)
Tetrahedron取向三角轴心
原标题:Tetrahedron orientation for triangle meshes

我有2个三角和vert,第0页,第1页,第2页,第3页。 这两条三角地相互交织。 从这两个三角洲中,我想用4个vert子给4个 tetra子。 我所工作的图书馆要求,“应当给4个vert,这样,在从外部看望时,四舍五入的三重vert在反锁定中。” 假设两种三角体中的一种为0, p1, p2 I计算出正常(p1-p0)(乘)(p2-p0)。 请允许我告诉我,如何确保满足这一条件?

最佳回答

简短回答:

条件是<代码>p3必须放在由<代码>(p0, p1, p2)确定的平面正确一侧。

因此,在计算这一飞机的正常状态之后,你需要确定(say)p0p3的病媒是否与正常方向或相反的方向相同,方法是采用


更数学地说:

你们需要找到四个点的同质坐标构成的4x4矩阵的决定因素。 格乌阿摩集团的标志确定条件是否得到满足;适当的标志取决于所采用的确切公约,但理想的做法是:

require:
  0 < det(p0, p1, p2, p3)

  == det [ p0.x p0.y p0.z 1 ]
         [ p1.x p1.y p1.z 1 ]
         [ p2.x p2.y p2.z 1 ]
         [ p3.x p3.y p3.z 1 ]

如果某一个定点有消极的决定因素,你可以将其固定下来,删除其中的任何两点(这将否定):

e.g., swapping p0 and p2:

det(p0, p1, p2, p3) = - det(p2, p1, p0, p3)
     ^       ^               ^       ^

或者,更一般地说,在四部vert中,从

如果 determinant为零,则四点为共同规划点,不能照此确定。


最后,该法典:

比较简单的方式,用3个病媒的数学来计算这一决定因素:

let:  v1 = p1 - p0
      v2 = p2 - p0
      v3 = p3 - p0
      norm12 = cross(v1, v2)
   -> determinant = dot(norm12, v3)

最终决定因素也称为“三产品”,即v1、v2和v3。

请注意,我已犹豫不决,试图将确切签署公约(即您是否需要签字)与你的问题脱钩:你提供的措辞和图表只不过是混淆。

由于你拥有原始图书馆和文件,你最有能力回答这一问题。 作为最后的手段,你可以尝试经验方法:尝试两个标志,并挑出一把钟。

问题回答

暂无回答




相关问题
How to add/merge several Big O s into one

If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Enumerating All Minimal Directed Cycles Of A Directed Graph

I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签