ArticleslgStudy

computer science

Möller–Trumbore intersection algorithm

Möller–Trumbore intersection algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Möller–Trumbore intersection algorithm rather than just read about it. In short: The Möller–Trumbore ray-triangle intersection algorithm, named after its inventors Tomas Möller and Ben Trumbore, is a fast method for calculating the intersection of a ray and a triangle in three dimensions without needing precomputation of the plane equation of the plane containing the triangle. Among other uses, it can be used in computer graphics to implement ray tracing computations involving triangle meshes.

Key takeaways

  • Möller–Trumbore intersection algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Möller–Trumbore intersection algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Möller–Trumbore intersection algorithm from memory before moving on to harder problems.

Reference excerpt

The Möller–Trumbore ray-triangle intersection algorithm, named after its inventors Tomas Möller and Ben Trumbore, is a fast method for calculating the intersection of a ray and a triangle in three dimensions without needing precomputation of the plane equation of the plane containing the triangle. Among other uses, it can be used in computer graphics to implement ray tracing computations involving triangle meshes.

Calculation

Definitions The ray is defined by an origin point O {\displaystyle O} and a direction vector D {\displaystyle D} . Every point on the ray can be expressed by r → ( t ) = O + t D {\displaystyle {\vec {r}}(t)=O+tD} , where the parameter t {\displaystyle t} ranges from negative infinity to infinity. The triangle is defined by three vertices, named v 1 {\displaystyle v_{1}} , v 2 {\displaystyle v_{2}} , v 3 {\displaystyle v_{3}} . The plane that the triangle is on, which is needed to calculate the ray-triangle intersection, is defined by a point on the plane, such as v 1 {\displaystyle v_{1}} , and a vector that is orthogonal to every point on that plane, such as the cross product between the vector from v 1 {\displaystyle v_{1}} to v 2 {\displaystyle v_{2}} and the vector from v 1 {\displaystyle v_{1}} to v 3 {\displaystyle v_{3}} :

n → ⋅ ( P 1 − P 2 ) = 0 {\displaystyle {\vec {n}}\cdot (P_{1}-P_{2})=0} , where n → = ( v 2 − v 1 ) × ( v 3 − v 1 ) {\displaystyle {\vec {n}}=(v_{2}-v_{1})\times (v_{3}-v_{1})} , and P 1 {\displaystyle P_{1}} and P 2 {\displaystyle P_{2}} are any points on the plane.

Check if the ray is parallel to the triangle First, find out if the line produced by the ray intersects with the plane that the triangle is on, and if it does, find the coordinates of that intersection. The only way that the line will not intersect the plane is if the ray's direction vector is parallel to the plane. When this happens, the dot product between the ray's direction vector and the plane's normal vector will be zero. Otherwise, the line does intersect the plane somewhere, but not necessarily within the triangle.

Check if the ray-plane intersection lies outside the triangle Using barycentric coordinates, any point on the triangle can be expressed as a convex combination of the triangle's vertices:

P = w v 1 + u v 2 + v v 3 {\displaystyle P=wv_{1}+uv_{2}+vv_{3}}

The coefficients must be non-negative and sum to 1, so w {\displaystyle w} can be replaced with 1 − u − v {\displaystyle 1-u-v} :

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Möller–Trumbore intersection algorithm

Start with the simplest possible case. Write down what Möller–Trumbore intersection algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Möller–Trumbore intersection algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Möller–Trumbore intersection algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Möller–Trumbore intersection algorithm

In research
Möller–Trumbore intersection algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Möller–Trumbore intersection algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Möller–Trumbore intersection algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Geometric algorithms, Geometric intersection, Triangle geometry, so understanding it makes those chapters shorter.
In everyday life
Look for Möller–Trumbore intersection algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Möller–Trumbore intersection algorithm” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Möller–Trumbore intersection algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Möller–Trumbore intersection algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Möller–Trumbore intersection algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Möller–Trumbore intersection algorithm in simple terms?

The Möller–Trumbore ray-triangle intersection algorithm, named after its inventors Tomas Möller and Ben Trumbore, is a fast method for calculating the intersection of a ray and a triangle in three dimensions without needing precomputation of the plane equation of the plane containing the triangle…

Why does Möller–Trumbore intersection algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Möller–Trumbore intersection algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Möller–Trumbore intersection algorithm.

Tags

  • Geometric algorithms
  • Geometric intersection
  • Triangle geometry

Keep exploring