Centroid of rectangle from Y coordinate

kris8888

New member
Joined
May 26, 2019
Messages
9
Hi everyone,

I have a problem i can't figure out...

I want to calculate the centroid of a tilted rectangle in a coordinate system (See image) based on the following informations

I know the Y coordinate of corner A
I know the slope of the line b to the X axis based on two known points
I know lenght of a and b

From a given point on line b (x,y) i need to find the centroid... Is this possible?

So given an example what would the centroid be

a = 10
b = 15

Y coordinate of A is 5

The angle/slope of line b to X can be calculated from eg. 0,10 and 10,15

From coordinate 0,10 can i calculate the centroid? If possible will the same formula work if slope is negative?

All the best,

Kris
 

Attachments

  • rectilt.png
    rectilt.png
    33.9 KB · Views: 8
The two points on line AD are enough to determine its equation. From that you can get the x coordinate of A. That is enough to determine the coordinate of the centroid. Just move the mid point of AD up half the length [MATH]a[/MATH] in the direction parallel to AB. Is that enough for you to finish it?
 
Last edited:
Thanks..

Is this correct:
Slope (M) = changeinY/changeinX = 5/10 = 0.5
Y = 5
B = 10
X = y-b/m = 5-10/0.5 = -10

But how do I get the middle of the line when it is rotated/move the centroid of the unrotated
 
Thanks..

Is this correct:
Slope (M) = changeinY/changeinX = 5/10 = 0.5
Y = 5
B = 10
X = y-b/m = 5-10/0.5 = -10

But how do I get the middle of the line when it is rotated/move the centroid of the unrotated
Yes, what you have is correct. So you know A = (-10,5) is the lower left corner and D is 15 units away at a slope of 1/2. Do you know how to work with vectors? Do you know how to make a unit vector along a line with slope 1/2? I'll get you started. A vector in the direction of AD is [MATH]\vec V = \langle 2,1\rangle[/MATH]. Do you know how to make a unit vector [MATH]\hat V[/MATH] from that? If you add [MATH]\frac {15} 2\hat V [/MATH] to the position vector [MATH]\langle 10,5\rangle[/MATH], you will get the mid-point [MATH]M[/MATH] of side CD. Are you with me so far?
 
Thanks for your answer!!

The unit vector is (2/5sq, 1/5sq) right?

Do I just multiply both coordinates with 15/2 like (7,5*2/5sq , 7,5*1/5sq) to get M of CD?
 
isn't it M of side AD I am calculating not CD? Should the position be (-10,5)?

1sq + 2sq

root of 5 is 2.236, so the unit vector is (1/2.236 , 2/2.236)
Would center point then be: ((7,5*(1/2.236))+(-10) , ((7,5*(2/2.236)+5)

Would I then be able to do the same with a vector with a starting point in center of AD in the direction of CD with 10/2 V for this one?
 
isn't it M of side AD I am calculating not CD? Should the position be (-10,5)?

Yes, that was a typo I missed. We are calculating the midpoint of AD.

1sq + 2sq

root of 5 is 2.236, so the unit vector is (1/2.236 , 2/2.236)
Would center point then be: ((7,5*(1/2.236))+(-10) , ((7,5*(2/2.236)+5)

Would I then be able to do the same with a vector with a starting point in center of AD in the direction of CD with 10/2 V for this one?
You never answered my question whether you have studied vectors or not. Have you? Did you understand the last line in post #4 about how to get the mid point M? And it would be easier for me to follow your work if you don't use decimals. I think your mid-point should come out [MATH]M = \langle -10+3\sqrt 5,5 + \frac 3 2 \sqrt 5\rangle[/MATH] when you simplify it. Once you have that you just have to move in the perpendicular direction from M a distance of half the length of the other side. Do you see how to get a unit vector perpendicular to [MATH]\hat V[/MATH] in that direction?
 
No I never studied this, but have just read up on it now. I think I will try on my own as I think I can figure it out. Thanks for your help I really learned a lot from it!!
 
Top