Get vertex value that shapes 90 degrees with triangle centroid

106 Views Asked by At

I have this triangle:

enter image description here

I'm trying to get the vertex value highlighted in the green circle in order to draw that red line. Is there any equation that I can use to extract that value?

The centroid vertex G = (x=5.5, y=1.5)
The other vertex B = (x=0, y=1)
and the last vertex C = (x=7, y=0)

Any help would be appreciated. I know it might be a 5th grade math but I can't think of a way to calculate this point.

CORRECTION: The centroid can’t be $G(5.5, 1.5)$. It should be $G(\frac{3+0+7}3,\>\frac{5+1+0}3) =G(\frac{10}3,\>2)$.

EDIT: Here's a test sample of the result: enter image description here

Here's the code I wrote to translate the equation to PHP:

$A = ['x' => 0, 'y' => 5];
$B = ['x' => 35, 'y' => 0];
$C = ['x' => 25, 'y' => 25];
$G = ['x' => 20, 'y' => 10];
$slope = -0.14285714285714; //-1/7

//equation1: solve left side
$e1 = ($A['y'] - $G['y']) * $B['x'];

//equation2: left side: calculate number of Xs in the left side of the equation i.e. = - 1, 
//we'll be moving it to the right side of the equation, therefore we must convert the value to a positive number
$Xs = $slope * $B['x'];// = -1/7 * 7

//equation3: right side: calculate the total number of Xs i.e. 49 + 1 - left and right
//** is power of 2, so 7 ** 2 = 49, then we moved the $Xs value to the right of the equation in a positive number
$totalXs = ($B['x'] ** 2) + abs($Xs);

//equation4: let's add all of the equations together to get the value of x
$x = ($e1 + (($B['x'] ** 2) * $G['x'])) / $totalXs;

//equation5: determine y
$y = ($slope * $x) + $G['y'];

echo 'x='.$x.', y='.$y;

EDIT 2: For anyone with bad math who's interested in knowing all the basics, here's a video tutorial that will give the full solution: https://www.youtube.com/watch?v=VuEbWkF5lcM

2

There are 2 best solutions below

1
On

Suppose the point that you want is labelled $P$. We know that $\overline{PG}\perp\overline{BC}$. Since we have $m_{BC}=-\frac17$, we have $m_{PG}=7$. This comes down to solving an equation $$m_{PG}=7=\frac{y-1.5}{x-5.5}.$$

To solve this equation, we need to use the equation of the line $\overline{BC}$: $y=-\dfrac17x+1$. Substituting, we get $$7=\frac{-\frac17x+1-1.5}{x-5.5}.$$

Can you take it from here?

1
On

Note that the slope of BC is $-\frac17$ and its equation is $y=-\frac17x+1$. The slope of the altitude is 7. The centroid is

$$x=\frac{0+3+7}3=\frac{10}3,\>\>\>\>\>y=\frac{1+5+0}3=2$$

and the altitude line is

$$y-2=7(x-\frac{10}3)$$

Then, the vertex is just its intersection with BC.

Edit:

The slope of AC is $\frac{5-0}{0-35}=-\frac17$ and its equation is

$$y-5=-\frac17(x-0)\implies y = -\frac17x+5\tag 1$$

The slope of the altitude line is $-\frac1{-\frac17}=7$ and its equation is

$$y-10=7(x-20)\implies y=7x-130\tag 2$$

Substitute (2) into (1) to eliminate $y$,

$$7x-130=-\frac17x+5\implies (1+\frac17)x = 135\implies x=\frac{189}{10}$$

and the corresponding $y=-\frac17\frac{189}{10}+5=\frac{23}{10}.$