Search code examples
vectorarea

how to get the triangle vector coordinate if the triangle area is known


i have a triangle, the vector is A(x1,y1), B(x2,y2), C(x3,y3), these are all known ,then i want to move up the Vector A to a new Position D(x1, y4)--just change the coordinate y, if the new triangle(BCD)'s area is known, how can i caculate the y4?

enter image description here

thanks to SaiBot, him share a solution like this: enter image description here


Solution

  • Geometrically thinking this can be solved in two steps.

    1. move A perpendicular to BC to the upper left until the triangle has the correct size. The size of a triangle is calculated by 1/2 * base * height.

    2. move A parallel to BC until A.x = D.x1. This will not change the area of the rectangle.