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...
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.....
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
First of all the dot product is always between 0 and 180 degrees (-1 to 1).
It look's like you want to find the angles in 3D which makes it a bit more tricky, the arc is normally 2D so trying to simplify it to a 2D problems would make things easier if possible.
I guess you could use the dot product to find the angles if you create a vector from the center of the "circle" going through the circles edge at 0 degrees and then use dot with this vector and a vector through each point to find the angle, but a simpler solution would be to use something like gpVec2d::Angle, this returns the angle in radians which would be more useful to you I guess.
02Author
hi thanks alot 4 reply...
i ve tried the things as u mentioned above , much before but not working as it need to be...
actually i am working on DXF conversion where i need start & end angle for arc..... now i dont know wheter the curve is a 2d or 3d... lets asume it as 3d so what i need to do to get these ang...
if any geometric processs u know plz tell me (probably i may undestand it)..... i think i need to calculate direction cosines but even i calculate that the start angle n end angle is with respect to what i mean should i cansider it with resp to x , or y or z or line joining origin and center of arc?
if u can understan it plz tell me as soon as possible