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에서 Spline Postprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!