2D Image in 3D plot through Surface perpendicular to viewingangle
15 views (last 30 days)
Show older comments
Hi,
so I want to include a 2D figure in a 3D plot and rotate the figure (with view([alpha beta])). As you can imagine, this would distord the surface plot. So basically I'm trying to figure out, how to adjust the surface plot to become perpendicular to the viewingangle (to see the figure as how it should be) and still being centered at the original location.
I found something like
img = imread('galileo3.png'); % Load a sample image
xImage = [...] % The x data for the image corners
yImage = [...] % The y data for the image corners
zImage = [...] % The z data for the image corners
surf(xImage,yImage,zImage,... % Plot the surface
'CData',img,...
'FaceColor','texturemap');
view([phi theta]);
But what's the meaning of the image corners? And how would I adjust the original coordinates, to rotate the surface towards the viewingangle (but still being centered at the original location)?
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!