Skip to main content
1-Visitor
Solved

Iregular polygon-area

Hi,

How can I determine the area and center of mass of a polygon knowing the coordinates of its points? the lenght of the segment 01 and the angle between lines 05 and 45?

Thank you,

Gabriel

Werner_E
Werner_EAnswer
25-Diamond I

For whatever it may be worth, here is a much more compact version of the intersect() routine. One of those "why didn't I thought of that before" things.

33 replies

23-Emerald I

Here's one way:

Translate
19-Tanzanite

Here's another way.

Alan

Translate
Werner_E
25-Diamond I

May I join the session?

Here is a third way 😉

29.04.png

Translate
19-Tanzanite

Well done Werner. Fred and I both forgot about the CofG part!

Alan

Translate
Werner_E
25-Diamond I

Well done Werner. Fred and I both forgot about the CofG part!

Looks like we all forgot about the second question

the lenght of the segment 01 and the angle between lines 05 and 45?

but I am not quite sure about this question, especially as the first part seems too trivial.

29.04.png

Translate
1-Visitor

Thank you gentlemen,

I'm not a regular matchad user, but whenever I search on this forum I see solutions from some of you guys. Thank you for sharing your experiece with us!

Werner, the angle was part of a second questions. It will follow. Now I have to run to a meeting.

regards,

Gabriel

Translate
1-Visitor

I tried, without any success, to extend the solutions proposed so that I can account for the variability of the angle alfa. I inserted an explanatory figure at the end of the worksheet. If alfa is 0 line 05 is horizontal. The top limit of alfa is defined by joining points 4 and 5. I would like to define alfa as a incremental variable within these limits. Line 45 has fixed slope (beta angle).

The idea is to make point 5 run on the 45 line and consequently generate values of the area and center of gravity for a fixed increment of alfa.

E.g. if alfa ranges between 0 and 10 deg, I would like to calculate for each degree of alfa the area and center of mass.

Thank you for all your good input.

Greetings,

Gabriel

Translate
23-Emerald I

With thanks to Werner for doing the hard work:

Translate
Werner_E
25-Diamond I

Fred Kohlhepp wrote:

With thanks to Werner for doing the hard work:

Fortunately it wasn't that hard a work 😉

Its surprising that something simple like the intersection of two straight lines can make much more work, especially if it should not fail at vertical lines.

See attached my attempt along with a little animation.

AreaGravityTable.png

Afterthought: The path of the center of gravity seems to be a hyperbola. At least thats what I get if I calculate the path for -180° to 180°

hyperbel.png

AGAIN! It seems that this happens always around that time!? WHen I edit a post and attach a pic it looks OK, but after Updating the pic is not seen!

I attach it as a file.

Translate
1-Visitor

I tried to replicate Werner's calculations for the section "coordinates of the uplift pressure-3/4 rectangular+1/4 triangular" without success. I verify the results with some cases for alfa= 0,10, 20 and -20 deg in autocad. If I verify individually for each alfa the results are correct. However, when I generate the results in the table at the end the values of the gravity centers are not correct. Clearly I'm missing something and I don't know what.

Translate
Werner_E
25-Diamond I

I have absolutely no idea what you are trying to do her and what geometrical figure you are dealing with. But the fact, that the table at the end correspond to the Autocad values for -20° only may be due to the fact, that your definition of X.U.2 and Y.U.2 use exactly those -20° which is defined above the "Animation" section and this value is a constant, you didn't made it variable.

Translate
1-Visitor

Sorry for not being clear enough. I'm trying to calculate the area and center of gravity of the blue trapezoid in the last graph. These properties are also dependent on the variable point P5(alfa). I attached a figure for clarity. The red contour is the initial position, the magenta is the final position.

I'm not quite sure if the -20° is just a coincidence. The areas are identical to those from autocad for angles of 0, 10, 20.

Now I realized what you meant Werner,

Basically my question is how can I add the coordinates of P5(alfa), in X.U.2 and Y.U.2 for every increment of alfa angle.

Thanks for helping.

Translate