필터 지우기
필터 지우기

plot3 curve to cylinder with curve as center

조회 수: 6 (최근 30일)
Julius Schroers
Julius Schroers 2021년 12월 8일
댓글: William Rose 2021년 12월 9일
I am currently trying to display my curves as cylinders using the surf function. With surf([x;x],[y;y],[z;z]) I can display my curve as a simple line. Is there an optimal approach to display this line as a cylinder? Alternatively I can increase the LineWidth but then the surface would behave exactly like the plot3 with increased LineWidth.
On the attached image all curves are plotted using the plot3 function and adjusting the LineWidth. I would like to display these curves as a cylinder using the surf function.

채택된 답변

William Rose
William Rose 2021년 12월 8일
See tubeplot.m and RenderLines2Tubes, which uses tubeplot. Both on the Matlab file exchange.
Good luck.
  댓글 수: 2
Julius Schroers
Julius Schroers 2021년 12월 8일
Thanks for the quick reply. The linked function is exactly what I was looking for. Great!
Finally lighting available.
You have saved me easily a week of work without success.
Thank you!
William Rose
William Rose 2021년 12월 9일
@Julius Schroers, you're welcome. Give credit to @Janus H. Wesenberg when you publish or present. By the way, I made a modified version of tubeplot that plots tapered tubes and removes the end caps. Your plot looks really nice and very sophisticated. The equations for the tube centerlines must be very complicated! Good luck with your work.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by