Introduction - If you have any usage issues, please Google them yourself
At first, this Matlab program draws a equilateral triangle. Then get its edge with canny operator and get three Hough Transfom straight line. There is an word document in this zip which is the direction.