Adding curves to a 1D line tree defined by points and connectivity

1 view (last 30 days)
Brian
Brian on 18 Mar 2016
Edited: Brian on 18 Mar 2016
Hello, thanks for reading this.
I was looking to create a curved tree network based off of an input of lines defined by points and connectivity. I looked a bit at the literature, and I think this problem has been solved many times over, but I'm having trouble because in the examples the lines are continuous. For me, I have n lines defined by points and connectivity.
Here is a snippet of code to give you an idea of how they look:
ptMx = [ 232.1498 -213.4505 94.4044
232.1498 -213.4505 52.2680
205.9872 -213.2559 25.8087
259.1540 -213.6514 28.2015];
faceMx = [1 2; 2 3; 2 4];
radii = [1.6; 1.6; 1.2; 1.1];
colorMx = colormap(jet(size(radii,1)));
colorMx = fliplr(colorMx);
h = patch('Vertices', ptMx, 'Faces', faceMx, 'FaceVertexCData', colorMx, 'EdgeColor', 'interp');
And what I want to do is add something like a Centripetal Catmull–Rom spline to make the lines connecting each point curved.
Before I continue, I just wanted to ask for helpful advice from people who are much smarter than I am on this issue. Any ideas?

Answers (0)

Community Treasure Hunt

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

Start Hunting!