Adding curves to a 1D line tree defined by points and connectivity
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Splines 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!