# Arbitrary volume

Hello,

I'm in the process of creating a calculation spreadsheet with Excel. In this spreadsheet I need to calculate a volume of an object that has an arbitrary cross-section but from the side of the cross-section, it is always triangle.

At the moment the spreadsheet calculates the volume of a circular or a rectangular cross-section. This I was able to achieve by integration. The cross-section can be created by giving the coordinates for the vertices.

Does anyone have any ideas of a formula or equation, if you prefer, that could calculate the volume when the cross-section truly is arbitrary?

PS. I tried to attach an image of the object that would've perhaps given you a better understanding of what I mean but if you do not see it, then that means the upload button is not working.

#### Attachments

• Volume.png
5.6 KB · Views: 452

mfb
Mentor
What do you mean by "from the side of the cross-section"?

The upload works, but it looks like a wedge where the volume calculation is trivial.

FactChecker
Gold Member
I will make some assumptions about your problem. Suppose you have a cross section of area A on the XY plain (z==0). Suppose that the entire object surface has every point on the boundary going straight back to a single point with value z0. Then the volume will be 1/4 * z0 * A.

CORRECTION: @mfb has corrected me. With these assumptions, it should be 1/3 * z0 * A.

Last edited:
mfb
Mentor
FactChecker
Gold Member
@FactChecker: That should be 1/3, not 1/4.
Oh. Of course. I stand corrected.

Last edited:
What do you mean by "from the side of the cross-section"?

The upload works, but it looks like a wedge where the volume calculation is trivial.

I mean that looking from the side, the object looks like a wedge or a triangle. What do you mean how is the volume defined?
Yes, calculating the volume when the cross-section is a rectangle is simple but the problem is, it could be any shape. Of course if you think it is still trivial then by all means care to elaborate.

Factchecker can you please explain what this z0 is? I have a feeling it is the center of the cross-section and in that case your equation only works for the picture I posted which was only supposed to give you an idea what I was talking about.

Thank you all for taking an interest in my problem.

I'm so sorry.

I just realized I was blinded by (confused) my problem. It's been a while since I thought about the problem. Calculating the volume is trivial as mentioned earlier which would be Area multiplied by half the thickness, right?

The real problem is getting the center of the volume for me. If we imagine that the cross-section is in the xy-plane then I'm interested in xy-coordinates of the center.

If you can forgive my silliness and help with with this problem that'd be great.

FactChecker
Gold Member
Calculating the volume is trivial as mentioned earlier which would be Area multiplied by half the thickness, right?
I assumed that the area shrinks to a point. Then it is area multiplied by 1/3 the thickness. If the area shrinks only along one axis to a straight line, it is area multiplied by 1/2.
The real problem is getting the center of the volume for me. If we imagine that the cross-section is in the xy-plane then I'm interested in xy-coordinates of the center.
That might be harder. Do you mean center of gravity assuming uniform mass or centroid?

mfb
Mentor
What do you mean how is the volume defined?
You need some way to describe the shape. Coordinates of vertices and a description of their connections, "in" and "out" data on a grid, some equation describing the boundary, or something else. The best method to find the volume will depend on that description.
Calculating the volume is trivial as mentioned earlier which would be Area multiplied by half the thickness, right?
See post #8.
The real problem is getting the center of the volume for me. If we imagine that the cross-section is in the xy-plane then I'm interested in xy-coordinates of the center.
What does "center" mean? There are many possible definitions.

I assumed that the area shrinks to a point. Then it is area multiplied by 1/3 the thickness. Do you mean center of gravity assuming uniform mass or centroid?

Umm... do you mean shrinks to a point like a cone? My initial idea was what I show in the picture but I suppose that could also be a possibility.

Oh and you can disregard most of what I said in post #7.
This dude said calculating the volume was trivial which made be doubt myself big time. That was the first formula I came up with at the time. Today I took a closer look at my calculations and it definitely is not trivial.

For example let's take a case where the cross-section is 1/4 of a circle, the only way I know, is to calculate that by integrating. You can say it is not hard but it most definitely is not trivial. I'm hoping you can prove me wrong because it would be a great help but then you need to prove it.

You need some way to describe the shape. Coordinates of vertices and a description of their connections, "in" and "out" data on a grid, some equation describing the boundary, or something else.

Do I not in the very first post mention that the area is given by vertices? Then the thickness x (in the picture) could be whatever but is not really important.

I want to emphasize that the object is always on one side this triangle shape. I forgot to draw it in the picture but one of the angles in the triangle is 90 degrees.

By center I mean centroid.

mfb
Mentor
Do I not in the very first post mention that the area is given by vertices? Then the thickness x (in the picture) could be whatever but is not really important.
For a cross-section, not for the full volume.

I said volume calculation is trivial for a wedge, not in general.
For example let's take a case where the cross-section is 1/4 of a circle, the only way I know, is to calculate that by integrating.
If the volume is going from the base area to a single point, 1/3 * area * height (orthogonal to the base area).
If the volume is going from the base area to a single line parallel to the base area, 1/2 * area * height.
In other cases, things get more complicated.

How do you get 1/4 of a circle with a finite number of vertices?

Last edited:
For a cross-section, not for the full volume.

I said volume calculation is trivial for a wedge, not in general.
If the volume is going from the base area to a single point, 1/3 * area * height (orthogonal to the base area).
If the volume is going from the base area to a single line parallel to the base area, 1/2 * area * height.
In other cases, things get more complicated.

How do you get 1/4 of a circle with a finite number of vertices?

Still waiting for a proof about it's triviality.

Yes, to a single point it makes a sort of a cone. How did you even come up with that based on the picture? I doubt that it's something I need. Anyway none of those are correct answers because that would mean I have to use a different equation for a whole spectrum of cross-sections.

One thing to keep in mind that the cross-section will not be a self-intersecting polygon.

About the circle, obviously we are never gonna get to the correct answer with finite number of vertices but we can get close. By the way that is still a wedge.

Also, no the volume of the wedge with the 1/4 of a circle is not 1/3 * area * thickness or 1/2 * area * thickness

Last edited:
mfb
Mentor
Still waiting for a proof about it's triviality.
For the volume of a wedge? It is as simple as the area of a rectangular triangle, multiplied by the height.
Yes, to a single point it makes a sort of a cone. How did you even come up with that based on the picture?
I didn't, FactChecker introduced it in post 3.

Also, no the volume of the wedge with the 1/4 of a circle is not 1/3 * area * thickness or 1/2 * area * thickness
Ah right, the 1/2 applies to a special case only. I don't understand how a wedge-like structure with a quarter circle as base and planar surfaces would look like.

In general, you can divide your volume into a finite number of tetrahedra, and sum their volumes.

Last edited:
I don't understand how a wedge-like structure with a quarter circle as base and planar surfaces would look like.

Here I'll show you mr. Trivial

For the volume of a wedge? It is as simple as the area of a rectangular triangle, multiplied by the height.

I don't think that applies to the wedge in the picture.

In general, you can divide your volume into a finite number of tetrahedrons, and sum their volumes.

Can you please provide some sort of an example, I have never done anything like that.

#### Attachments

• Circular_wedge.png
1.6 KB · Views: 392
mfb
Mentor
Here I'll show you mr. Trivial
The surfaces are not planar.
I don't think that applies to the wedge in the picture.
Sure it does. Its volume is a*b*X/2.
a*X/2 is the triangle.
Can you please provide some sort of an example, I have never done anything like that.
See figure 2.9 here for example.

The surfaces are not planar.

I have no idea what that means.

Sure it does. Its volume is a*b*X/2.
a*X/2 is the triangle.

You didn't just seriously blurt something like that after coming up in here claiming that wedge calculation was trivial. XD
I am of a mind to let you think about that for yourself but since you just proved you're not so smart after all, I'll tell you.

The idea is correct yes, but the problem is that the height a keeps changing. So no, it does NOT apply to it.

mfb
Mentor
I have no idea what that means.
Which part is unclear? Your figure has bent surface areas, at least in your sketch.
You didn't just seriously blurt something like that after coming up in here claiming that wedge calculation was trivial. XD
I said "the calculation for [this] specific shape is trivial", and it is. For this specific shape. Not for all others.

I don't get the impression you are interested in answers, so this is my last post here.

Which part is unclear? Your figure has bent surface areas, at least in your sketch.
I said "the calculation for [this] specific shape is trivial", and it is. For this specific shape. Not for all others.

I don't get the impression you are interested in answers, so this is my last post here.

I don't understand what word planar means. If you see something bending then it's and optical illusion. I drew a semicircle which has a triangle cross-section which I did say is always there.

It is unfortunate that you feel I'm not looking for answers because I am. I was merely trying to make a point that you did not know what you were talking about. I'm not the one who straight up tries to belittle the OP's question when it should be clear that it is not a simple wedge being talked about.