# Barycenter of 3 points

29 replies to this topic

### #21 torigara

torigara

GMC Member

• GMC Member
• 6507 posts

Posted 18 November 2010 - 02:12 AM

Usually Mathematica will give you every solution, even ones you don't want.

I don't know much about Mathematica, but does it give solutions when there is an infinite number of them?

The problem here is that, when a set of numbers (a0, b0, c0) is a solution, then (n*a0, n*b0, n*c0) is also a solution for all n (except 0.) Actually, G is determined by the ratio a:b:c.

If we suppose that a=1 then this will became 2 equations system.
Is this correct?

Sorta correct; that's another way to add a constraint (by putting 1:b1:c1=a:b:c to obtain one of solutions.)

If you don't still follow, consider the following scales as a simplified example. Given the mass of each weight, it is easy to determine the balancing point C.
```|
|
+--------+-----------------+
|        C                 |
+--+--+                    +--+--+
| 50g |                    | 25g |
|     |                    +-----+
+-----+

|<------>|<--------------->|
10cm           20cm```
However, the reverse isn't generally possible. If weights are unknown, all we can tell is that M1=2*M2 (or M1:M2=2:1) unless there is additional information (e.g. M1 is a constant.)
```|
|
+--------+-----------------+
|        C                 |
+--+--+                    +--+--+
|  ?  |                    |  ?  |
|     |                    +-----+
+-----+                       M2
M1

|<------>|<--------------->|
10cm           20cm```

As for solving the problem: supposing that $a+b+c \ne 0$, the aforementioned three equations are tranformed as following.
a(Ax-Gx) + b(Bx-Gx) + c(Cx-Gx) = 0
a(Ay-Gy) + b(By-Gy) + c(Cy-Gy) = 0
a(Az-Gz) + b(Bz-Gz) + c(Cz-Gz) = 0

The first one represents a 3-d plane whose normal vector is (Ax-Gx, Bx-Gx, Cx-Gx) and passes the point (0, 0, 0). The latter two represent other planes all passing (0, 0, 0). Solving the above simultaneous equations is equivalent to finding the intersection of those three planes. It is apparent that they intersect at (0, 0, 0), but it isn't the solution because of the restriction that a+b+c is not 0. To have intersection point other than (0, 0, 0), all of three planes must share the same intersection line (i.e. their normal vector is on a same plane.) All solutions lie on this common intersection line.

So, we only have to calculate the intersection line between the first two (the other one also shares the same line.) Now, let the direction vector of the intersection line (Va, Vb, Vc). This is perpendicular to the normal vector of two planes. So, just calculate the cross production:
Va = (Bx-Gx) * (Cy-Gy) - (Cx-Gx) * (By-Gy)
Vb = (Cx-Gx) * (Ay-Gy) - (Ax-Gx) * (Cy-Gy)
Vc = (Ax-Gx) * (By-Gy) - (Bx-Gx) * (Ay-Gy)

Choose an arbitray number t (that is not 0), then you can derive a, b and c as:
a = t * Va
b = t * Vb
c = t * Vc

Edited by torigara, 18 November 2010 - 10:37 AM.

• 1

### #22 xshortguy

xshortguy

GMC Member

• Global Moderators
• 4261 posts
• Version:GM:Studio

Posted 18 November 2010 - 02:57 AM

I don't know much about Mathematica, but does it give solutions when there is an infinite number of them?

Typically yes--it'll write everything in terms of some free variables. If you had three unknowns and two equations, it'll get it down to one equation.
• 0

### #23 The Scorpion

The Scorpion

GMC Member

• GMC Member
• 416 posts
• Version:GM8

Posted 18 November 2010 - 07:07 AM

I don't really follow you in here. But here comes an idea, If we suppose that a=1
then this will became 2 equations system.
Is this correct?

Don't approach the problem like this. Instead, just solve the system of three equations and three unknowns.

Ok, I'll try that. thx any way
• 0

### #24 The Scorpion

The Scorpion

GMC Member

• GMC Member
• 416 posts
• Version:GM8

Posted 18 November 2010 - 11:59 AM

Usually Mathematica will give you every solution, even ones you don't want.

I don't know much about Mathematica, but does it give solutions when there is an infinite number of them?

The problem here is that, when a set of numbers (a0, b0, c0) is a solution, then (n*a0, n*b0, n*c0) is also a solution for all n (except 0.) Actually, G is determined by the ratio a:b:c.

If we suppose that a=1 then this will became 2 equations system.
Is this correct?

Sorta correct; that's another way to add a constraint (by putting 1:b1:c1=a:b:c to obtain one of solutions.)

If you don't still follow, consider the following scales as a simplified example. Given the mass of each weight, it is easy to determine the balancing point C.
```|
|
+--------+-----------------+
|        C                 |
+--+--+                    +--+--+
| 50g |                    | 25g |
|     |                    +-----+
+-----+

|<------>|<--------------->|
10cm           20cm```
However, the reverse isn't generally possible. If weights are unknown, all we can tell is that M1=2*M2 (or M1:M2=2:1) unless there is additional information (e.g. M1 is a constant.)
```|
|
+--------+-----------------+
|        C                 |
+--+--+                    +--+--+
|  ?  |                    |  ?  |
|     |                    +-----+
+-----+                       M2
M1

|<------>|<--------------->|
10cm           20cm```

As for solving the problem: supposing that $a+b+c \ne 0$, the aforementioned three equations are tranformed as following.
a(Ax-Gx) + b(Bx-Gx) + c(Cx-Gx) = 0
a(Ay-Gy) + b(By-Gy) + c(Cy-Gy) = 0
a(Az-Gz) + b(Bz-Gz) + c(Cz-Gz) = 0

The first one represents a 3-d plane whose normal vector is (Ax-Gx, Bx-Gx, Cx-Gx) and passes the point (0, 0, 0). The latter two represent other planes all passing (0, 0, 0). Solving the above simultaneous equations is equivalent to finding the intersection of those three planes. It is apparent that they intersect at (0, 0, 0), but it isn't the solution because of the restriction that a+b+c is not 0. To have intersection point other than (0, 0, 0), all of three planes must share the same intersection line (i.e. their normal vector is on a same plane.) All solutions lie on this common intersection line.

So, we only have to calculate the intersection line between the first two (the other one also shares the same line.) Now, let the direction vector of the intersection line (Va, Vb, Vc). This is perpendicular to the normal vector of two planes. So, just calculate the cross production:
Va = (Bx-Gx) * (Cy-Gy) - (Cx-Gx) * (By-Gy)
Vb = (Cx-Gx) * (Ay-Gy) - (Ax-Gx) * (Cy-Gy)
Vc = (Ax-Gx) * (By-Gy) - (Bx-Gx) * (Ay-Gy)

Choose an arbitray number t (that is not 0), then you can derive a, b and c as:
a = t * Va
b = t * Vb
c = t * Vc

Thx torigara, It Actually work
I don't know what to say, soory for the late respond,
I actually missed this reply yesterday. Thx again.

Ok can I ask one last thing, can you rewrite
Va,Vb and Vc with (x and z coords) and if possible too (zy)

thank you very much if you do that

Edited by The Scorpion, 18 November 2010 - 01:29 PM.

• 0

### #25 torigara

torigara

GMC Member

• GMC Member
• 6507 posts

Posted 19 November 2010 - 02:12 PM

Ok can I ask one last thing, can you rewrite
Va,Vb and Vc with (x and z coords) and if possible too (zy)

Well, why do you need it? It is the same answer. Anyway, it's a simple transposition: just replace all y with z.
• 0

### #26 Yourself

Yourself

The Ultimate Pronoun

• Retired Staff
• 7352 posts
• Version:Unknown

Posted 20 November 2010 - 02:34 AM

I see, you are strictly working with three points and three coefficients.

If you have what you're saying:
eqn1 = Gx == a Ax / (a + b + c) + b Bx / (a + b + c) + c Cx / (a + b + c)
eqn2 = Gy == a Ay / (a + b + c) + b By / (a + b + c) + c Cy / (a + b + c)
eqn3 = Gz == a Az / (a + b + c) + b By / (a + b + c) + c Cz / (a + b + c)

Then your goal hopefully is to find a, b, c, given that you have Gx, Gy, Gz, etc.

Unfortunately, Mathematica does not yield a solution to this.

Using these equations exactly yields a solution for a and b in terms of c in Mathematica. This makes sense because it characterizes the infinity of solutions (since there's one degree of freedom).
• 0

### #27 The Scorpion

The Scorpion

GMC Member

• GMC Member
• 416 posts
• Version:GM8

Posted 20 November 2010 - 12:35 PM

Well, why do you need it? It is the same answer. Anyway, it's a simple transposition: just replace all y with z.

Well suppose that a tiangle that its X or Y coords are all the same, the Equation will always be 0. See! Thx for the reply, it helped too.
• 0

### #28 petermark1234

petermark1234

GMC Member

• New Member
• 5 posts

Posted 04 December 2010 - 06:05 AM

triangle
Take a triangular sheet and put on it, at point A, a 1 kg weight, at point B, a 2kg weight, and at point C a 3kg weight. The barycenter of the system ponderates points is the centre of gravity of the sheet, that means the point where the sheet is balanced. Call it G. You guess that G will be closer to C than to A. G verifies the vector equality : propriete barycenter
In general, the barycenter G of ponderates points verifies :

propriete fondamentale du barycenter
How to build a barycenter :
To draw it, decompose 2 of the 3 vectors according to the vectors you can already build. Long but simple :
calculation construction barycenter

So G is here :
vecteurs triangle
• 0

### #29 The Scorpion

The Scorpion

GMC Member

• GMC Member
• 416 posts
• Version:GM8

Posted 04 December 2010 - 11:59 AM

triangle
Take a triangular sheet and put on it, at point A, a 1 kg weight, at point B, a 2kg weight, and at point C a 3kg weight. The barycenter of the system ponderates points is the centre of gravity of the sheet, that means the point where the sheet is balanced. Call it G. You guess that G will be closer to C than to A. G verifies the vector equality : propriete barycenter
In general, the barycenter G of ponderates points verifies :

propriete fondamentale du barycenter
How to build a barycenter :
To draw it, decompose 2 of the 3 vectors according to the vectors you can already build. Long but simple :
calculation construction barycenter

So G is here :
vecteurs triangle

I'm not really following you here, Any way I solved the problem.
• 0

### #30 chance

chance

GMC Member

• Local Moderators
• 6403 posts
• Version:GM:Studio

Posted 04 December 2010 - 12:13 PM

The barycenter of the system ponderates points is the centre of gravity of the sheet, that means the point where the sheet is balanced. Call it G. You guess that G will be closer to C than to A. G verifies the vector equality : propriete barycenter
In general, the barycenter G of ponderates points verifies

Finally somebody explained this clearly without all those damn fool equations.
• 0

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users