07-04-2008 09:13 PM
07-05-2008 02:33 AM
07-05-2008 03:04 AM
Hello Mike,
Thanks for your reply.
I attached a sketch of what i am trying to do. I have these two stick moving in circular path. No. 1 stick has its fixed position at P1(0,0) which has end at P2. P2 coordinates can be calculated since i know its Radius (R1). Likewise, No. 2 stick has its fixed position at P3 (40,25) which has end coordinates at P4. P4 coordinates can also be calculated since i know its Radius (R2). Both of the stick can move either clockwise or counterclockwise independently from each other. Both of the two stick can also extend or shorten their radius.
I always have to monitor the distance between the two stick so that i can prevent them from colliding to each other. I am stll researching on the right code/formula on how to calculate the distance between the two stick.
I hope i explained it well. Thanks for your help.
07-05-2008 03:53 AM
07-05-2008 07:55 AM
07-05-2008 08:08 AM
07-05-2008 08:09 AM
07-05-2008 10:37 AM
The trivial answer would be to just keep r1+r2 < distance(P1,P2). This will prevent all "potential" collisions. 🙂
07-06-2008 07:02 PM
Hi Muks,
------------------------------------------------------------------------
Can you go the other way round.Define the regions for stick one and stick two and define the danger zones.Keep monitoring on the defined regions and once one stick is in that region make alteration to the other stick like delaying the movement or something in the similar lines.
-------------------------------------------------------------------------
Thanks for your reply. I will study your idea and suggestion. About the speed each of the stick has speed range from 1 to 5. If the stick is on the danger zone i plan to cut the higher speed (3,4,5) so that it will stop properly, say 3 meters, away from the other stick.
Thanks a lot.
07-06-2008 07:03 PM