Trouble using campos and camtarget to navigate a 3D figure
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/687438/image.jpeg)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/687443/image.jpeg)
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Specifying Target for Graphics Output in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!