Detect entering a region of interest in plot

3 views (last 30 days)
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.

Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!