필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Brian
Brian 2016년 3월 18일
편집: Brian 2016년 3월 18일
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개)

카테고리

Help CenterFile Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by