简体   繁体   中英

plotting image in a 3D plot, python

I'm looking to plot an image on an arbitrary plan in 3 space. I've used matplotlib for some 3d curve plotting and I've had good luck. Something more specific would be putting 6 different images on a cube and rotating it in space, (this could be done with several plots saved as images). I cannot just rotate the camera, I will have multiple cubes rotate in different directions. I would expect a 3Dplot method that allows me to pick the four corners of an imported image. Were i using MATLAB i would use something like this which allows you to plot an image in 3space with the following code:

C = rand(8,4)*64;                % a small random image
R = [1 0; 0 1; 0 0];
t = [10-1;20-1;5];
h = image3(C,[R t]); axis equal
view(30,45);

I would like to do this with Python.

I cannot definitely deny that this is possible in matplotlib, but it's definitely not the intent of mpl. I'd really propose to use mayavi instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM