1

I'm implementing the formula from https://math.stackexchange.com/a/2841311 but this formula talks about vertices.

Given 4 points $p1,p2,p3,p4$, how do I find the vertices of my tetrahedron?

I did

$v1 = p2-p1\\v2 = p3-p2\\v3 = p4-p3$

then

$V = \frac{1}{6}|(v1\cdot v2) \times v3|$

but I'm getting lots of 0 values from this formula, and some other strange values.

Is something wrong?

ps: I want one point of my tetrahedron to always be $(0,0,0)$, but tetrahedrons don't have 'special points', rigth? I can just take any point to be $(0,0,0)$?

KReiser
  • 74,746
Poperton
  • 6,594
  • That formula should work. Can you give a worked example of a tetrahedron where you're given the vertices $p_i$ and you compute the edges $v_j$ and the volume $V$? If you keep getting $0$, my guess is that you've accidentally messed up the indices, such that one of the edges is the sum of the other two. – Chris Culter Mar 22 '20 at 05:34
  • By the way, the question title says "How to obtain vertices" and the body says "how do I find the vertices", but these are typos, right? You meant to ask about the volume? – Chris Culter Mar 22 '20 at 05:35
  • @ChrisCulter I want to find the volume, but for that I need the vertices from the points, that's what I mean – Poperton Mar 22 '20 at 05:57
  • 2
    A tetrahedron is defined by four vertices. If someone gives you the "points" of a tetrahedron, they mean the vertices. The vertices are the points. They're two words for the same thing. – Chris Culter Mar 22 '20 at 06:16
  • 1
    The formula makes no sense: you mean $v_1\cdot(v_2\times v_3)$. – ancient mathematician Mar 22 '20 at 07:40
  • @ancientmathematician you're rigth. But the formula with your correction is correct for measuring the volume of a tetrahedron given 4 points? – Poperton Mar 24 '20 at 02:11
  • Yes. But as @Reinhard Mein says in his solution it's rather silly to cycle through the points in the way you have. If your vertices are $0,p_1,p_2,p_3$ then the volume is $\frac{1}{6} p_1\cdot(p_2\times p_3)$. – ancient mathematician Mar 24 '20 at 08:29
  • @ancientmathematician does it matter where the $0$ point is? How would the formula for $p_1,p_2,p_3,p_4$ look? – Poperton Mar 24 '20 at 18:09
  • We would move $p_4$ to the origin and the other three vertices to $p_1-p_4, p_2-p_4, p_3-p_4$. @Reinhard Meier has explained this already in his answer and in his comments. – ancient mathematician Mar 25 '20 at 07:31

1 Answers1

1

You have to move your tetrahedron such that one of the four vertices $p_1$, $p_2$, $p_3$, $p_4$ becomes $0$. You can perform a translation of the tetrahedron e.g. by subtracting $p_4$ from each of the vertices $p_i$ and you will get $$ p_1 - p_4 \\ p_2 - p_4 \\ p_3 - p_4 \\ 0 $$ as new vertices. This translation preserves the volume. Now you have your $v_1$, $v_2$ and $v_3.$ As you can see, you have to subtract the same $p_i$ each time. Do not "cycle" through the points.

Maybe one of the native speakers can comment on the difference between "vertex" and "point" (I am not a native English speaker).

From my experience, "vertex" is used to denote pointy parts of the boundaries of figures, while "point" is used when we simply talk about a certain location in space (which is not necessarily associated with a figure). So it really depends on the context which one to use, and there are contexts (like this one) where both terms make sense.

  • I explained wrongly. The points of my tetrahedron are already organized in a way such that one is in (0,0,0). I don't think this is even worth mentioning, don't know why I did. Do you think my reasoning is correct: given 4 points, I can find the volume with such formula? I meant: |v_1\cdot(v_2\times v_3)|/6 – Poperton Mar 24 '20 at 02:12
  • @GuerlandoOCs Sure, the volume is given by that formula (given that you get the order of evaluation of the dot product and the cross product right. In your question, it is wrong.) But still your way to "organize the points in a way that one is 0" is not correct. $p_2-p_1$, $p_3-p_2$ and $p_4-p_3$, as written in the question, does not make sense. – Reinhard Meier Mar 24 '20 at 09:22
  • To put it in different words: In order to use the formula, you need three vectors that represent three edges of the tetrahedron with a common vertex. You have chosen three vectors that represent three edges that form a chain of line segments. – Reinhard Meier Mar 24 '20 at 09:34
  • The organization of the points was not for that. Please analyze my question simply as how to calculate the volume given points. I thougth that in order to get the vertices of the formula, I should subtract the points, but I guess it's not like this. So simply, given 4 points, how to calculate the tetrahedron volume? – Poperton Mar 24 '20 at 18:08
  • $v_1 = p_1 - p_4,$ $v_2 = p_2 - p_4,$ $v_3 = p_3 - p_4.$ Then use the corrected formula $\frac16|v_1\cdot(v_2\times v_3)|.$ If you want to have it all in one single formula, it would obviously be $\frac16|(p_1-p_4)\cdot((p_2-p_4)\times (p_3-p_4))|.$ – Reinhard Meier Mar 24 '20 at 18:12