You will write three functions: the scalar triple product of three vectors, the volume of a tetrahedron from its four corners and a test for four points in one plane. The checker uses the numbers of the lesson.
The idea. The triple product is the determinant of the three vectors. The tetrahedron has one sixth of the volume of the parallelepiped on three edges from one corner. Four points are coplanar when the triple product of the three edges from one of them is zero.
Your tasks.
triple(a, b, c). Compute .tetra_volume(A, B, C, D). Use the edges from A.coplanar(A, B, C, D). Return True when the triple product is zero.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…