Finding the Centroid of a Coke Bottle

  • Context: Undergrad 
  • Thread starter Thread starter cytochrome
  • Start date Start date
  • Tags Tags
    Centroid
Click For Summary

Discussion Overview

The discussion revolves around calculating the centroid of a coke bottle, which is modeled as a cylinder with varying radius. Participants explore numerical methods for finding the centroid, considering both full and hollow bottles, and discuss the implications of the bottle's thickness on the calculations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks to find the centroid using a vector of radius points and the volume of the bottle.
  • Another participant suggests that if the radius points represent a surface of revolution, the centroid will lie on the cylindrical axis, and provides a formula for calculating it.
  • There is a question about whether the bottle is full or empty, which affects the centroid calculation.
  • One participant proposes using the principle of moments to find the centroid of the remaining material after calculating the centroids of the outer and inner surfaces.
  • Another participant discusses integrating the arc length over the surface of revolution and provides a method for doing so, emphasizing the need to account for thickness.
  • A different approach is suggested, where radius and height are represented parametrically as functions of contour arc length, involving differential equations to determine the centroid.
  • Participants express interest in various methods and the potential for multiple approaches to solve the problem.

Areas of Agreement / Disagreement

Participants express multiple competing views on how to approach the centroid calculation, particularly regarding the treatment of the bottle's thickness and whether to consider the inner or outer surfaces. The discussion remains unresolved with no consensus on a single method.

Contextual Notes

Some participants mention the need for spline interpolation and the integration of cubic segments, while others highlight the importance of defining the contour angle and using the principle of moments. There are unresolved mathematical steps and assumptions regarding the bottle's geometry and thickness.

Who May Find This Useful

This discussion may be useful for individuals interested in numerical methods for centroid calculations, particularly in the context of irregular shapes and varying geometries in engineering or physics applications.

cytochrome
Messages
163
Reaction score
3
I'm trying to find the centroid of a coke bottle, which is basically like a cylinder with varying radius.

I have a 1x500 vector of radius points and I have the volume of the bottle, any thoughts on how to calculate the centroid numerically?
 
Physics news on Phys.org
When you say radius points, do you mean you have a set of points (z,r) which represent some surface of revolution? If you assume such a cylindrical symmetry, then it's clear that the centroid must lie on the cylindrical axis.

Are you talking about a full bottle or empty bottle? If you are talking about a full bottle, you can use something like
EDIT: formula was wrong.
[itex]\left< z \right> = \frac{\int z 2\pi/3 r^3 dz}{\int 2\pi/3 r^3 dz}[/itex]
You'll have to find r as a function of z. You can do this with a spline interpolation. It is common to use cubic splines. I'll let you search for resources on how to do that. Anyways, you'll get a bunch of cubic segments. To integrate over the curve, you'll integrate over each cubic segment (which you can do analytically), and take the sum.
 
Last edited:
Khashishi said:
When you say radius points, do you mean you have a set of points (z,r) which represent some surface of revolution? If you assume such a cylindrical symmetry, then it's clear that the centroid must lie on the cylindrical axis.

Are you talking about a full bottle or empty bottle? If you are talking about a full bottle, you can use something like
[itex]\left< z \right> = \frac{\int z 2\pi r^2 dz}{\int 2\pi r^2 dz}[/itex]
You'll have to find r as a function of z. You can do this with a spline interpolation. It is common to use cubic splines. I'll let you search for resources on how to do that. Anyways, you'll get a bunch of cubic segments. To integrate over the curve, you'll integrate over each cubic segment (which you can do analytically), and take the sum.

Thanks! Yes I have r as a function of z and I have the appropriate curves obtained from spline interpolation. My bottle is hollow and has a certain thickness, how will that change the problem?
 
Find the centroid of the empty space. Find the centroid of the outer surface. Use the principle of moments to find the centroid of what's left.
 
How does the principle of moments apply here?
 
In that case, if you neglect the thickness, you can integrate the arc length over the surface of revolution
http://en.wikipedia.org/wiki/Arc_length

In the numerator, you integrate everything weighted by z, and in the denominator, you integrate the same thing without the z.
 
cytochrome said:
Thanks! Yes I have r as a function of z and I have the appropriate curves obtained from spline interpolation. My bottle is hollow and has a certain thickness, how will that change the problem?

I have an interesting way of doing this that I think will appeal to you. Rather than representing r as a function of z, represent r and z parametrically as a function of the contour arc length s: r = r(s) and z = z(s) such that
[tex](dr)^2 +(dz)^2=(ds)^2[/tex]
Next, define the contour angle θ of the bottle by tanθ=dr/ds.

We are going to determine the function θ=θ(s) which best fits the contour shape of the bottle. We do this as follows: Write the equations for the variation in r and z as functions of s:

[tex]\frac{dr}{ds}=sinθ(s)[/tex]
[tex]\frac{dz}{ds}=cosθ(s)[/tex]

These equations guarantee that the sum of the squares of the differential changes in r and z are equal to the square of the differential change in the contour length.

We are going to solve these equations for r and z as functions of s for a given prescribed variation in θ(s). We are going to be seeking the best representation of θ(s) that matches the contour shape of the coke bottle. To do this, we are going to express θ(s) as a cubic spline function of s, by specifying just a limited number of values of θ (say <10) along the contour, and we will seeking the set of θ values at these locations that minimizes the sum of the squares of the distances from the predicted contour to the actual contour. This will involve integrating the above equations multiple times, and varying the θ values at the prescribed points to minimize the deviation. Once we know θ as a function of s, we can add the following two differential equations (assuming the bottle thickness is constant):

[tex]\frac{dM}{ds}=2πr(s)z(s)[/tex]
[tex]\frac{dS}{ds}=2πr(s)[/tex]
where M is the cumulative moment with respect to z = 0, and S is the cumulative surface area.

The center of mass, as measured from the bottom of the bottle is M/S evaluated at the value of s corresponding to the top of the bottle.
 
SteamKing said:
Find the centroid of the empty space. Find the centroid of the outer surface. Use the principle of moments to find the centroid of what's left.

How can I use this principle to solve for the centroid of a hollow body? How does that change the centroid equation?
 
If you can describe the outer surface of the bottle (by whatever means), you can calculate the volume and centroid of this surface. Do likewise for the interior of the bottle. The volume and centroid of the material forming the bottle must be the difference between the two.

To be clear, by principle of moments, I mean that Vb*cb = VO*cO-VI*cI, where

Vb - V bottle
cb - centroid of the bottle

VO - Volume of outer surface
cO - centroid of outer surface

VI - Volume of bottle interior surface
cI - centroid of bottle interior surface
 
  • #10
SteamKing said:
If you can describe the outer surface of the bottle (by whatever means), you can calculate the volume and centroid of this surface. Do likewise for the interior of the bottle. The volume and centroid of the material forming the bottle must be the difference between the two.

To be clear, by principle of moments, I mean that Vb*cb = VO*cO-VI*cI, where

Vb - V bottle
cb - centroid of the bottle

VO - Volume of outer surface
cO - centroid of outer surface

VI - Volume of bottle interior surface
cI - centroid of bottle interior surface

Very helpful, thanks!
 
  • #11
Chestermiller said:
I have an interesting way of doing this that I think will appeal to you. Rather than representing r as a function of z, represent r and z parametrically as a function of the contour arc length s: r = r(s) and z = z(s) such that
[tex](dr)^2 +(dz)^2=(ds)^2[/tex]
Next, define the contour angle θ of the bottle by tanθ=dr/ds.

We are going to determine the function θ=θ(s) which best fits the contour shape of the bottle. We do this as follows: Write the equations for the variation in r and z as functions of s:

[tex]\frac{dr}{ds}=sinθ(s)[/tex]
[tex]\frac{dz}{ds}=cosθ(s)[/tex]

These equations guarantee that the sum of the squares of the differential changes in r and z are equal to the square of the differential change in the contour length.

We are going to solve these equations for r and z as functions of s for a given prescribed variation in θ(s). We are going to be seeking the best representation of θ(s) that matches the contour shape of the coke bottle. To do this, we are going to express θ(s) as a cubic spline function of s, by specifying just a limited number of values of θ (say <10) along the contour, and we will seeking the set of θ values at these locations that minimizes the sum of the squares of the distances from the predicted contour to the actual contour. This will involve integrating the above equations multiple times, and varying the θ values at the prescribed points to minimize the deviation. Once we know θ as a function of s, we can add the following two differential equations (assuming the bottle thickness is constant):

[tex]\frac{dM}{ds}=2πr(s)z(s)[/tex]
[tex]\frac{dS}{ds}=2πr(s)[/tex]
where M is the cumulative moment with respect to z = 0, and S is the cumulative surface area.

The center of mass, as measured from the bottom of the bottle is M/S evaluated at the value of s corresponding to the top of the bottle.

Thanks a lot for this, it's always nice to have more than one way for going about something
 
  • #12
Khashishi said:
When you say radius points, do you mean you have a set of points (z,r) which represent some surface of revolution? If you assume such a cylindrical symmetry, then it's clear that the centroid must lie on the cylindrical axis.

Are you talking about a full bottle or empty bottle? If you are talking about a full bottle, you can use something like
EDIT: formula was wrong.
[itex]\left< z \right> = \frac{\int z 2\pi/3 r^3 dz}{\int 2\pi/3 r^3 dz}[/itex]
You'll have to find r as a function of z. You can do this with a spline interpolation. It is common to use cubic splines. I'll let you search for resources on how to do that. Anyways, you'll get a bunch of cubic segments. To integrate over the curve, you'll integrate over each cubic segment (which you can do analytically), and take the sum.

I think that formula is incorrect, correct me if I'm wrong.
 
  • #13
cytochrome said:
Thanks a lot for this, it's always nice to have more than one way for going about something

The method I described in #7 was an approach we used in actual engineering practice in the man-made fiber company I worked for back in the day to parameterize the cross sectional geometry of radial automobile tires (measured using plaster casts), as part of our analysis of the deformational mechanics of the tires under operational loading conditions. This was in support of sales and customer service to our tire cord customers in the tire industry.

As a supplement to the analysis I presented in #11, I might also mention that, if the thickness of the bottle is variable along the contour of the bottle, this can be accounted for simply by multiplying the right hand sides of the last two differential equations by the local thickness t(s).
 
Last edited:

Similar threads

Replies
27
Views
4K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 6 ·
Replies
6
Views
8K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K