Detect entering a region of interest in plot

Hi,
I have a plot where I have plotted an obstacle, as a 'patch', a start point and an end ROI, which is centred circle around a point.
The plot is random and the shape of the obstacle will keep varying and even the no.of them. I have attached a sample image along with this question.
The task am trying to achieve is he following.
The dot/poit/bot at the lower left of the plot, will move by a certain distance for every iteration.
1. If it hits the obstacle, it should return to its previous position. For this, I have to detect basically when it hits the obstacle. Can you please tell me how I can achieve this using matlab.
2. When it enters thew region of circle, there it should stop.
Basically, the problem is how can I detect a point entering a region in matlab.? Please help me here. I hope this can teach me more. Thanks in advance, I am trying few things, but am not definite of what exactly I can try.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by