jasmines Posted September 2, 2011 Posted September 2, 2011 Hi, I'm a programmer and was just playing about with some AI for a game. There is a moving object http://www.ahappydea...oduct_31869.htm <b><b> which has a target point it is travelling to. It will travel to this point directly except it may need to evade a circular area. I'm trying to find the point to use as an intermediary target to evade the circle. Attached is an image which shows the situation. On that image: Point a is the target of the object Point b is the object itself Point c is the center point of the circle to avoid Point d is the point we're trying to find Points a, c and d are known The length of the dotted line dc is known The circle is probably not necessary. In my head ab and cd are perpendicular (??). The angle inside point c (ie the angle opposite ab within the triangle abc) is known. I'll call this theta just for a moment. In the triangle bcd the angle inside c (ie the angle opposite db) is half theta. I keep drawing lots of pretty pictures but haven't actually got anywhere with the problem! I could probably work it out if ab was parallel to the y axis (2d space) but I cannot guarantee that it will be so there's my problem! Any thoughts on the above? Thanks in advance, Kazatan </b></b> Attached Images
michel123456 Posted September 2, 2011 Posted September 2, 2011 (edited) It will travel to this point directly except it may need to evade a circular area. I'm trying to find the point to use as an intermediary target to evade the circle. trying to understand your preoccupation... you are at point b, you want to reach a, but you have first to escape the circle as soon as possible, is that correct? The circle is probably not necessary. ??? In my head ab and cd are perpendicular (??). Why? If I understand correctly, the line a-d must be tangent to the circle. The angle inside point c (ie the angle opposite ab within the triangle abc) is known. I'll call this theta just for a moment. O.K. In the triangle bcd the angle inside c (ie the angle opposite db) is half theta. I have a serious doubt. Edited September 2, 2011 by michel123456
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now