I have exported the centerline of my vessel and its branches as a matrix in matlab.... Now I want to detect the main vessel and the branches and color them differently ... Any one has an idea?
Assume you have a triangle defined in a matrix form:
x=[1 2 3 1];y=[-1 2 3 -1];z=[-1 1 2 -1];
you can plot the triangle using plot3(x,y,z) and/or fill it with different colors using fill3(x,y,z,'color'). 'color' is the desired color, e.g. 'b' for blue, 'g' for green, etc.
Please note that if you have for instance 3 points for the triangle, you need to add the first element to end of matrix in order to sketch the triangle and not only three points.