MATLAB Answers

Graphic intersection: how to trigger a colour change

5 views (last 30 days)
john_arle on 4 Nov 2019
Dear all,
I am plotting real time trajectories on a map full of obstacles.
The obstacles are polygons and my domain is 2D.
I would like to color in red trajectories of bodies that cross an obstacle,
to show that this is unphysical. Of course, that part of the trajectory has to change colour.
Any suggestions?
Trajectories are plotted in real time according to a running simulation.
I believe that checking at every iteration whether all the trajectories coincide with the contour of the
obstacles would kill the performance.


Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!