Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. Finding coordinations for 2 vertexes of an equilateral triangle
  2.  
  3.  
  4. I have an equilateral triangle with known coordinations of one vertex (a,b).
  5. I know that each side's length is t and the coordinations of the other vertexes (x1, y1), (x2, y2).
  6. There is another point (c, d) which creates with (a,b) a segment in length k that is perpendiculars to the opposite side of (a,b).
  7. I need to express x1, y1, x2 and y2 with the given parameters a, b, c, d, t and k.
  8. I started with four equations:
  9. Because we have perpendicular segments, we can say that their slopes's product equals -1.
  10. 1) (d-b)/(a-b)=(x2-x1)/(y2-y1).
  11. It is also known that the distance between each two vertexes is t, so expressing each side with the given coordinations gives us another three equations:
  12. 2) (a-x1)^2 + (b-y1)^2 = t^2
  13. 3) (a-x2)^2 + (b-y2)^2 = t^2
  14. 4) (x2-x1)^2 + (y2-y1)^2 = t^2
  15. I tried solving the equation and got the following answers:
  16. x1 = a-t*(d-b+sqrt(k^2-3*(d-b)^2))/(2*k)
  17. y1 = b+t*((d-b)*sqrt(k^2-3*(d-b)^2)-(a-c)^2)/(2*k*(a-c))
  18. x2 = a-t*(d-b-sqrt(k^2-(d-b)^2))/(2*k)
  19. y2 = b+t*(2*(d-b)*(a-c)-(a-c)^2+(d-b)*sqrt(k^2-3*(d-b)^2))/(2*k*(a-c))
  20.  
  21. I tried to substitute some numbers for the parameters but it doesn't get right.
  22.  
  23. I'll be really glad if you could help me.
  24. Thank you
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement