views:

15

answers:

1

Hi,

I need to calculate a chord`s starting and ending point, now I have the starting point which lies on the circumfrence of the circle and I also have the angle between starting point and ending point, but I cannot seem to find a way to determine the end of point of chord as it should lie on the circumfrence , I also have the centre and radius of circle, the methods I have looked over the internet all give chord length. So i in short I need to find the other end of a chord when one point and the angle between both points is given, any idea of links would be appreciated

thanks Imran

A: 

The arbitrary point on the circle with center (X0,Y0) and radius R has coordinates

x = Xo+R*cos(a)
y = Y0+R*sin(a), 0<=a<2*Pi 

knowing X,Y,X0,Y0 and R you can easily find angle a:

a = acos((x-X0)/R) (may be + Pi depending on sign of the y-Y0).

Then you can calculate the angle for the second chord endpoint (you'll have two solutions actually) - a+angle and a-angle. Then put angle you got into circle equation and you'll get your required points coordinates.

Vladimir
actualy I know P1 and the angle between P1 and P2 of the chord, but I`m trying to find p2 which lies on the cirumfrence of the circle. Since I have no clue about the length of the chord, I only have P1, angle between p1 and p2 and circle's centre x,y and radius.
@user, yes knowing point p1 you can calculate the angle for that point (the one used in circumference equation), then adding (or subtracting) to it angle between P1 and P2 you'll find the angle for P2. then you will be able to calculate coordinates of P2 as you will know all values for circle equation.
Vladimir