Any one can help me??? How to find the center angle of a circle . Given, center (XC, YC), two points P1(x1,y1) and P2 (x2,y2). How to find the angle between this two line which meets at the center.
id convert the idea to vector
the angle between 2 vectors: \[cos(a)=\frac{u.v}{|u||v|}\]
since the |u||v| are equal thats just the radius squared
\[a=cos^{-1}\frac{(X-P_1).(X-P_2)}{r^2}\]
come to think of it, it might be better to define u and v when the center is at the origin; so subtract X from the points
|dw:1326403981451:dw|
\[a=cos^{-1}\left(\frac{(x_1-x_c)(x_2-x_c)+(y_1-y_c)(y_2-y_c)}{\sqrt{(x_1-x_c)^2+(y_1-y_c)^2}}\right)\] that might be right .. never tried to write it out like this before
we can test it out with P1(0,1) and P2(1,0) this forms a 90 degree angle with a radius of 1 \[a=cos^{-1}(\frac{0+0}{1})\] \[a=cos^{-1}(0)=pi/2\]
seems to work
thanks
Join our real-time social learning platform and learn together with your friends!