A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Need help finding coordinates of a triangle

  1. #1
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766

    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.

    Any help please? I am really bad at maths.....so please be patient and help me!
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  2. #2
    Bacon-wrapped closures Nialsh's Avatar
    Join Date
    Dec 2003
    Location
    Houston!
    Posts
    338
    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. #3
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    Sorry for the late reply!

    Thanks nialsh, that really helped me a lot.
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  4. #4
    Member
    Join Date
    Feb 2010
    Posts
    59
    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)
    Last edited by Suthers; 04-23-2010 at 02:45 PM.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center