Turbulence421
Member
Hi everyone,
I could use some help with the parameters for draw_triangle(x1, y1, x2, y2, x3, y3, outline)
I'd like to draw a triangle where the coordinates of the first point are pre-determined, and the coordinates of the other two points are determined based on distance and rotation from the first point. So for example, let's say point 1 is at (50,50), point 2 is 90 degrees with a distance of 20, and point 3 is 180 degrees with a distance of 40. In this case, I need a calculation so that point 2 lands at (50,30) and point 3 lands at (10,50).
I'm pretty sure this is basic trigonometry, but it's been so long since I took that in high school and I could use some direction.
Thanks for your help!
I could use some help with the parameters for draw_triangle(x1, y1, x2, y2, x3, y3, outline)
I'd like to draw a triangle where the coordinates of the first point are pre-determined, and the coordinates of the other two points are determined based on distance and rotation from the first point. So for example, let's say point 1 is at (50,50), point 2 is 90 degrees with a distance of 20, and point 3 is 180 degrees with a distance of 40. In this case, I need a calculation so that point 2 lands at (50,30) and point 3 lands at (10,50).
I'm pretty sure this is basic trigonometry, but it's been so long since I took that in high school and I could use some direction.
Thanks for your help!
Attachments
-
12.6 KB Views: 3