hi i m having a arc with its center pc, its start point pst, and end point pend.
now i want to find start angle and end angle of this arc. i ve tried it using vector method(dot product)
i ve created three vectors one(v0) point joining center and a point with increament of R in x cord of center; second(v1) vect betn pc1, pst; 3rd(v2) betn pc1 and pend...
and calculated and as
StartAng = (acos((v0.Dot(v1))/(v0.magnitude()*v1.magnitude()))*(180/PI);
EndAng = (acos((v0.Dot(v2))/(v0.magnitude()*v2.magnitude()))*(180/PI);
multiplied by 180/PI for rad to degree conversion
its geving me output but the are not as it needed...
even angles are always betn 0 t0 180 actully should be 0 to 360....
i am giving some values of center with start ang and end ang
cx cy cz st_ang end_ang
42.83 -2.4 0 90 176.793
41.3564 11.40 0 164.584 77.7906
0 0 0 15.4165 19.293
40.49 14.17 0 112.5 160.70 33.84 26.36 0 142.084 55.2906
0 0 0 37.9165
above are some sample angs
i want to know what exactly is my mistake....
if not is there any other method to get angles...
plz give me ans i m in a lot need of it
wishing a reply.....