How do you get the board foot of special shapes
Board foot is 12x12x1 inches, so 144 cubic inches, so calculate volume in cubic inches (see your geometery teacher/look up online) and divide by 144.

BUT!

If you want to know "how many board feet I need to buy to make (whatever odd shape of whatever volume)" you'll need to go back to rectangular prisms since lumber is sold in rectangular pieces. And even making rectangular pieces, some waste is expected getting from the rough lumber to the finished product.