Calculating the geometric centroid of a floor plan
Calculating the geometric centroid of a floor plan
(OP)
I have been struggling with this for a few days now. When I think I have a code that works for any possible geometric configuration, I find a flaw. You kind folks are my last resort.
I have two columns in my spreadsheet, for x and y values. The user inputs the following to create a square:
x,y
0,0
0,50
50,50
50,0
0,0
Then, I am trying to get my spreadsheet to find the centroid of this shape. Easy enough for a square, but my code needs to work for any possible configuration. For example, this configuration:
x,y
0,30
0,120
50,120
50,155
80,155
80,180
155,180
155,155
290,155
290,120
300,120
300,19.3
50,0
0,30
How can I find the centroid of the shape that the above would give me? I'm about to rip my hair out. Would appreciate any and all help. Thank you.
I have two columns in my spreadsheet, for x and y values. The user inputs the following to create a square:
x,y
0,0
0,50
50,50
50,0
0,0
Then, I am trying to get my spreadsheet to find the centroid of this shape. Easy enough for a square, but my code needs to work for any possible configuration. For example, this configuration:
x,y
0,30
0,120
50,120
50,155
80,155
80,180
155,180
155,155
290,155
290,120
300,120
300,19.3
50,0
0,30
How can I find the centroid of the shape that the above would give me? I'm about to rip my hair out. Would appreciate any and all help. Thank you.
Clansman
If a builder has built a house for a man and has not made his work sound, and the house which he has built has fallen down and so caused the death of the householder, that builder shall be put to death." Code of Hammurabi, c.2040 B.C.





RE: Calculating the geometric centroid of a floor plan
http://newtonexcelbach.wordpress.com/
=====================================
(2B)+(2B)' ?
RE: Calculating the geometric centroid of a floor plan
Have a GREAT weekend!
Clansman
If a builder has built a house for a man and has not made his work sound, and the house which he has built has fallen down and so caused the death of the householder, that builder shall be put to death." Code of Hammurabi, c.2040 B.C.
RE: Calculating the geometric centroid of a floor plan
Clansman
If a builder has built a house for a man and has not made his work sound, and the house which he has built has fallen down and so caused the death of the householder, that builder shall be put to death." Code of Hammurabi, c.2040 B.C.
RE: Calculating the geometric centroid of a floor plan
RE: Calculating the geometric centroid of a floor plan
htt
=====================================
(2B)+(2B)' ?
RE: Calculating the geometric centroid of a floor plan
Mike McCann
MMC Engineering
RE: Calculating the geometric centroid of a floor plan
http:/
The on-sheet calculation is fairly straightforward, but using the Secprop User Defined Function is really much more convenient, flexible and robust, so I have also included that with the download spreadsheet.
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: Calculating the geometric centroid of a floor plan
Tara
http://tinyurl.com/4ydjg7m
RE: Calculating the geometric centroid of a floor plan
=====================================
(2B)+(2B)' ?