How can I save 2D display view images of a 3D textured mesh from given view angles?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Beril Sirmacek
el 8 de Mayo de 2018
Respondida: Alfonso
el 8 de Mayo de 2018
Is it possible to use viewmtx() for creating 2D images of a 3D textured mesh at a certain view angle? Or else, how can I save the 3D textured mesh as an image when it is seen from different angles?
0 comentarios
Respuesta aceptada
Alfonso
el 8 de Mayo de 2018
Take a look at this
% 3D mesh (example)
x = -2:0.25:2;
y = x;
[X,Y] = meshgrid(x);
F = X.*exp(-X.^2-Y.^2);
surf(X,Y,F)
% Get azimuth and elevation of current view
[az, el] = view;
% Change view of plot
az=230;el=30;
view (az, el)
% Convert current plot view in image (get frame)
filename = '3D_view1.png';
saveas(gca,filename)
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!