Trouble using campos and camtarget to navigate a 3D figure

3 ビュー (過去 30 日間)
Ashley
Ashley 2021 年 7 月 17 日
I'm working on a project visualizing 3D maps of biological systems. I'm trying to create a video where the camera travels through the hollow channel of a tubular system. I have a 3D surface rendering and a list of 475 coordinates defining a path within the largest of the curved tubes.
The path should follow the large U-shaped tube in the image below, going in the right entrance, circling around, and coming out of the left entrance:
I have tried using campos and camtarget to iterate through the coordinates, setting the view to a coordinate from the variable xypos, and the camera target as the next point in the list.
uiopen('practice_campos_scatter.fig',1);
camva('manual');campos('manual');camtarget('manual')
load('campos_coords.mat','xypos');
for b=1:size(xypos,1)-1
campos(xypos(b,:))
camtarget(xypos(b+1,:))
drawnow
disp([b size(xypos,1)])
end
The result is very strange looking (often showing a completely blank figure or a figure with one point). I would appreciate any help!
note: the surface rendering is a very large file that is slow to manipulate on some computers, so I have uploaded instead a scatter3 fig file consisting of a subsampling of the coordinates of the surface:

回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by