tags:

views:

38

answers:

1

I want to draw line from one point to another unknown point.I want to find this unknown point using its angle and radius from current point. Then i want to draw between these two points as line..

Can anyone help me?

Thanks in advance...

Note:

I already used these method

x2 = x1 - length * cos(angle)
y2 = y1 - length * sin(angle)

But these found point is not correct for some angle...

+1  A: 

Some things to check:

  1. The use of - and + after ... = x1 and ... = y1 depends on the angular coordinate system you want to use. Make sure you've got this right.
  2. Likewise cos and sin may need to be swapped.
  3. Is angle in radians? If it's in degrees, it won't work.

Note that I'm not suggesting you have points 1 and 2 wrong. It's impossible to say without knowing how you want your geometry to function, and what coordinate system you're using. Plus, the iPhone SDKs are a bit schizophrenic in this regard.

Marcelo Cantos
sorry,Its my mistake.. I use this mainly for find mirror point of triangle.(Its working fine) For some distance my triangle changes to trapezoid . Can you tell me how to find mirror point of trapezoid ?
dragon