A Flash Developer Resource Site

# Thread: Need help finding coordinates of a triangle

1. ## Need help finding coordinates of a triangle

Known things:
angle CAB
angle DAB
AB is perpendicular to CD
length of AB
coordinates of A and B

Need to find:
Coordinates of C and D.

2. length of BC = L*tan(angle CAB)
length of BD = L*tan(angle DAB)

Tangent is a good function to know. http://en.wikipedia.org/wiki/Trigono...ctions#Tangent

In Flash it's Math.tan(). This may be enough info to find the coordinates - if you need more help, let me know.

-Neal

3. Sorry for the late reply!

Thanks nialsh, that really helped me a lot.

4. tan(angle CAB)=CB/AB

so, CB= AB*tan(angle CAB)

sin(angle CAB)=CB/(AC)

so, AC= CB/sin(angle CAB)

This gives you the length of all sides of the triangle ACB. With this you can find the coordinates, just imagine that angle C is at the origin (0,0). Howevner, the bottom left corner of the stage is not 0,0 it is (height of the stage,0)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap