How to calculate this ?

Discussion in 'Trading' started by Digs, Jul 30, 2010.

  1. Digs

    Digs

    Hi I am a little long in the tooth and I cant remember how to calculate cosine and sine etcs

    I am programming a drawing tool, and I need to calculate x3,y3?

    How do I do this with the data I have ...

    UPDATE : (NEW INFO) Also NOTE x2, Y2 can be at any point on the red circle !


    [​IMG]
     
  2. Use similar right triangles, where d appears in both.

    Make an equation of ratios (proportion).

    Do a proportion for X3 and a proportion for Y3.

    I will illustrate the triangles (4) if necessary
     
  3. Digs

    Digs

    Sorry, please spell out the formula, thanks.. something I can code in vb.net ...
     
  4. Should I just shoot you the code?
     
  5. I assume thats the center of the circle?

    If so, D is the radius, meaning that half the side of the square is equal to D, which means that you just add D to your X and Y cordinate,
     
  6. Digs

    Digs

    If you do that I'll send you a 12 pack of beer !
    ha ha
     
  7. Digs

    Digs

    .."If so, D is the radius, meaning that half the side of the square is equal to D, which means that you just add D to your X and Y cordinate,"...

    David666 that does seam correct as X3 and Y3 are not equal distance from x1 and y1 to x2 and y2
     
  8. Digs

    Digs

    UPDATE : Also NOTE x2, Y2 can be at any point on the red circle !
     
  9. Correct me if I am misreading the question, but you are asking for the cordinates of the X3 and Y3 correct? not the distance from X1 Y1 to X3 to Y3?

    The cordinates are equal to X1 +D and Y1 +D.

    Of coursing a diagonal through this is gonna be longer because the distance is longer , but the cordinates are correct.
     
  10. x3=x1+d, y3=y1+d
     
    #10     Jul 30, 2010