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:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Program to calculate area and volume of a Tetrahedron
- Program to find the Area and Volume of Icosahedron
- Program to find the Volume of a Triangular Prism
- Program to find Surface Area and Volume of Octagonal Prism
- Program to find volume and surface area of pentagonal prism
- 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 for volume of Pyramid
- Program to calculate volume of Ellipsoid
- Program to calculate volume of Octahedron
- Program for Volume and Surface Area of Cuboid
- Program for Volume and Surface Area of Cube
- Program to calculate Volume and Surface area of Hemisphere
- Program for Volume and Surface area of Frustum of Cone
- Find the volume of rectangular right wedge
- Find the concentration of a solution using given Mass and Volume
- Find maximum volume of a cuboid from the given perimeter and area
- Calculate Volume of Dodecahedron
- Volume of cube using its space diagonal
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.