Given the length of edges of an irregular tetrahedron. The task is to determine the volume of that tetrahedron.
Let Edge length of pyramids be u, U, v, V, w, W.
Input: u = 1000, v = 1000, w = 1000, U = 3, V = 4, W = 5 Output: 1999.9947 Input: u = 2000, v = 2000, w = 2000, U = 3, V = 4, W = 5 Output: 3999.9858
Formula to calculate Volume of an irregular Tetrahedron in terms of its edge lengths is:
Volume = sqrt(A/288) =
sqrt(4*u*u*v*v*w*w – u*u*(v*v + w*w – U*U)^2 – v*v(w*w + u*u – V*V)^2 – w*w(u*u + v*v – W*W)^2 + (u*u + v*v – W*W) * (w*w + u*u – V*V) * (v*v + w*w – U*U)) / 12
Below is the implementation of above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Program to calculate area and volume of a Tetrahedron
- Java Program for Program to calculate area of a Tetrahedron
- Python Program for Program to calculate area of a Tetrahedron
- Program to calculate area of a Tetrahedron
- Program to find the Area and Volume of Icosahedron
- Program to find the Volume of a Triangular Prism
- Program to find volume and surface area of pentagonal prism
- Program to find Surface Area and Volume of Octagonal Prism
- Program for Volume and Surface Area of Cube
- Program for Volume and Surface Area of Cuboid
- Program for volume of Pyramid
- Program to calculate volume of Ellipsoid
- Program to calculate Volume and Surface area of Hemisphere
- Program for Volume and Surface area of Frustum of Cone
- Program to calculate volume of Octahedron
- Find maximum volume of a cuboid from the given perimeter and area
- Find the volume of rectangular right wedge
- Find the concentration of a solution using given Mass and Volume
- Volume of cube using its space diagonal
- Calculate Volume, Curved Surface Area and Total Surface Area Of Cylinder
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.