How to detect when 2 surface plots collide ?
Show older comments
Hi,
I am creating a pipe work system using matlab script where the pipe is represented using surface plot. I want to be able to flag up a warning when 2 surface plots (pipes) clash with each other.
The script determins the direction of the pipe by searching the workspace data for pipe start nodes (SN) and end nodes (EN) (added to workspace before hand). It will then do the checks SNx - ENx~=0 , SNy-ENy~=0, SNz-ENz~=0. depending on the check results the pipe will be plotted in the order of X-section (if check ~=0), Y- section (if check ~=0) then Z- section (if check ~=0).
The 2 pipes I have clashing, 1 is only X-direction section of pipe and the clashing pipe is only Y-direction section of pipe.
looking for some code to add to my script that will flag up the collision ?
thank you.
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots 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!