How to get the coordinates to create a triangle?

244 Views Asked by At

I will create an equilateral triangle.

This basic triangle

The starting point of the triangle will have coordinates x and y that can be any real number.

The starting point, geometrically, will be the vertex above the triangle.

Then, given a position (x, y)

What will be the other two points, to make this triangle equilateral and thus join the points?

Image of explanation

2

There are 2 best solutions below

1
On BEST ANSWER

I think that there are infinitely many different combinations of points that could satisfy your criteria, but let's assume for the sake of this problem that we have a side length $s$ for our equilateral triangle and that we have our usual $xy$ coordinate system. We will also assume that that the base of the triangle is parallel to the $x$-axis.

What we can do is try to find the height of our triangle, and then we will have enough information to solve this problem. If we drop a height from the top vertex to the base, we will split the base in half, so the bottom part of the triangle will have length $\frac{s}{2}$ and the hypotenuse will be $s$. Since this a right triangle, we can apply the Pythagorean Theorem, which yields:$$(\frac{s}{2})^2+h^2=s^2$$ Solving for $h$ yields the following: $$h=\frac{s\sqrt{3}}{2}$$

So, our points are $(x\pm\frac{s}{2},y-\frac{s\sqrt{3}}{2}).$

A visual solution for what is described above can be seen here.

0
On

If the height of your triangle is $h$ then the side is $h\sqrt 3/3$. Therefore $$ (x_1,y_1)=(x-h\sqrt 3/6, y-h)$$ and $$ (x_2,y_2)=(x+h\sqrt 3/6, y-h)$$