The first thing to note about this shape is the characterization of the faces. The two "ends" are triangular faces. There are three quadrilateral faces which form the boundaries of the non-constant triangular cross-section. The three edges shared by the quadrilateral faces are not parallel with each other and the quadrilaterals could be completely irregular. Here is a quick video of a Sketchup model of just such a shape:

The Un-Pyramid from Darren Irvine on Vimeo.

Since the consecutive pairs of "side" edges are part of a quadrilateral (they are proper "faces"—no twists), they are certainly coplanar. In a previous post, I demonstrated that two parallel faces with edges joining corresponding vertices with consecutive edges being coplanar, the parallel faces are necessarily similar. I also demonstrated (Proposition 4) that the projected side edges intersect at a common point, which we may call the apex.

The un-pyramid does not have the two parallel faces that formed the starting point in that post. However, it does have the consecutive coplanar edges. And although we have not been given a "top" face parallel with the bottom, we can certainly make one. We establish a cutting plane through the closest vertex (or vertices—there could be two at the same level) of the "top" face which is parallel with the larger "bottom" face. (We can turn the un-pyramid around to make the names fit if it comes to us upside down or sideways.) Now we can be sure that the side edges can be projected to a common apex as per 3D Analogue to the Trapezoid (part 3).

Fig. 1. A really irregular triangular pyramid? Hmm... |

_{1}, B

_{1}, C

_{1}, A

_{2}, B

_{2}, and C

_{2}as the parameters. To verify you have valid data establish that:

- A
_{1}A_{2}is coplanar with B_{1}B_{2} - B
_{1}B_{2}is coplanar with C_{1}C_{2} - C
_{1}C_{2}is coplanar with A_{1}A_{2} - Also, make sure these same edges don't intersect each other (meaning the lines projected through them should intersect outside of the boundaries of the line segments).

_{1}B

_{1}C

_{1}or A

_{2}B

_{2}C

_{2}. Then reorder or relabel the end faces as necessary. The face further away is the base (say

_{1}). Now determine which of the top vertices is closest to the base and establish a cutting plane through it, parallel to the base.

(Hint: It will be convenient to reorder or relabel your points so that A

_{2}is the closest point, B

_{2}next, and C

_{2}furthest; this avoids polluting your code with cases. Don't forget to reorder the points in the base. You may have a job making the relabeling of previous calculation results work properly. Making clear code that does minimal recalculations is probably the most challenging aspect of this problem if treated as a programming challenge.)

Now we can calculate the volume as a sum of two volumes:

- Frustum of a (slanted) pyramid with base A
_{1}B_{1}C_{1}and top A_{2}BC. - For the overall formula, see 3D Analogue to the Trapezoid (part 2)
- To find the areas of the top and bottom, use the cross-product method (see Area of Triangle Given Coordinates)
- To find the height, find the component of vector (A
_{2}– A_{1}) perpendicular to the base (also used in Volume of a Tetrahedron) - Slanted pyramid with base BB
_{2}C_{2}C and apex A_{2} - Find the area of the base
- watch out for B = B
_{2}and C = C_{2}which changes the shape of the base - If both are true, then you've dodged the bullet—there's no volume to worry about.
- If B = B
_{2}, then either it is at the same level as C_{2}or the same level as A_{2}. But in either case, you have a triangular base. - Very possibly neither of these will be true. Break the quadrilateral up into two triangles using the diagonal of your choice.
- Find the height of the pyramid using the component method as for finding the height of the first volume.

But, what should we call it?

- triangular un-pyramid
*really*irregular triangular prism- skew-cut slanted triangular pyramid
- alternatively, skew-cut slanted pyramid with triangular base

I guess I like 1) for the advertizing, 2) for the baffling rhetorical effect, and 3) for half a hope of conveying what the shape really is.