Trouble using campos and camtarget to navigate a 3D figure
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!