 Bucaro TecHelpHTTPS Encryption not required because no account numbers orpersonal information is ever requested or accepted by this site Custom Search            # Calculate The Points of an Equilateral Triangle

An equilateral triangle is a triangle in which all three sides and all three angles are congruent (all the same amount and all have the same relationship to each other). All three internal angles are each 60 degrees.

Starting an equilateral triangle is easy, you just draw a line. A line has two points P1(x1,y1) and P2(x2,y2). However, drawing the third point to create an exact equilateral triangle requires a bit of calculation. One way to figure it out is to consider one side as a vector. Then if you rotate the vector by 60 degrees, you will discover the location of the third point. Lets assume the side we have is a line from P1(5,7) to P2(10,9). It would be easier to rotate this vector if we translate it to the origin. To do that we have to add a translation vector to it. The translation vector T(-5,-7) brings P1 to the origin. When the translation vector T is applied to P2 we get P2'(5,2).

Now we can use the following matrix operation to rotate the vector 60 degrees:

```x' = (x2 * cos(60)) - (y2 * sin(60))
y' = (x2 * sin(60)) + (y2 * cos(60))

x' = .768
y' = 5.33
``` So, the three points of the equilateral triangle are p1(0,0) P2(5,2) and P3(.768,5.33). Next we can reverse the translate we used to move the original line to the origin. The reverse translation vector would be T(5,7). When the translation vector T is applied we get P1(5,7) P2(10,9) P3(5.768,12.33).

 .menubtn { margin-top:10px; margin-left:50px; width:220px; opacity:1; border-style:solid; border-color:#009000; background-color:#66ff66; transition-property: opacity; transition-duration: 1s; transition-timing-function: ease-out; } .menubtn:hover { opacity:1; background-color:#e5ff23; } Menu - More Java Script Programming RSS Feed Follow @Stephen Bucaro       [Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2021 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268