Volume of pyramid with 2 toppoints I know how to calculate a pyramid's volume when I have the base and perpendicular height to the 1 toppoint. It's by
$$\frac13 \cdot \mbox{base} \cdot \mbox{height}$$
However, what if the top is not a point, but a line? Is this easy to calculate?
Also, is there a difference between an pyramid with a regular rectangle as base, and a pyramid with some other shaped base (for example a irregular plane with 6 points.). Cause at the end I need to calculate it for a pyramid with an irregular base. But, at first, an rectangle as base would be a good start.
edit:
for clearification: line E-F is parallel to plan ABCD:

for clearification: line E-F is parallel to plane ABCD and line CD:

the second one can be splitted in a prisma and a piramid, but how about the first one?
 A: 
A simple form
In figure top of the pyramid is a line , lower height is h and higher height is k. Base is rectangle , sides a and b.Suppose the coordinates of lower top is $(0, \frac b2, h$ and that of higher top is $(a, \frac b2, k)$; The slope of the line on the top is:
$m=\frac{k-h}a$
So the equation of the line on the top is:
Or: $z=\frac{k-h}a x+h$
The volume of pyramid is:
$$V=\int^b_0dy\int^a_0 dx\int^{z=\frac{k-h}x x+h}_0 dz=\frac {k-h}a a^2b+abh$$
Example: a=4, b=2, k=3, h=2:
$V=\frac{3-2}4\times  4^2\times 2+4\times 2\times 2= 24$
If you put $h=0$ the figure becomes a pyramid and it's volume is:
$V=\frac14\times 4^2\times 2=8 $
We compare his with when top is a point:
$v=\frac 13 \times 4\times 2=\frac 83$
If the line on top is parallel with zy plane at hight h, then there will be a triangle on side(on ZY plane) it;s area is $A=\frac 12 bh$ and the volume of pyramid is $V= A.b=\frac12 abh$. For example a=4, b=2 and h=3 $\rightarrow V=\frac12 \cdot 4\cdot 2\cdot3=12$. If base is irregular but we know its area and also the legth of the line on the top, then we can find volume as:
$b=\frac Aa$
where  A is area of base, a legth of the line on the top and b is equivalent width of the base if rectangular . So volume is:
$V=\frac12 ab h =\frac 12 Ah$
The volume of figure in your question is:
$V= A_{ABCD}\times\frac{h_{AED}+h_{BFC}}2$
where $A_{ABCD}$ is the area of base ABCD and $h_{AED}$ and $h_{BFC}$ are the heights of walls AED and BFC.
