3D stereoscopic views

2 views (last 30 days)
Franta Cymorek
Franta Cymorek on 22 Dec 2016
Edited: David Shaw on 10 Sep 2017
I have plotted a 3D curve in Matlab so I can have a look on it with different angles. I have used plot3 command. But now I have to customize it for 3D stereoscopic view (no matter if I am going to use active or passive glasses), could you please send me any link, links, etc... where I can find a way for it? Note, that even using 3D glasses (active or passive) I have to be able to move with the curve so I can look on it with different angles.
Thank you for any help!

Answers (1)

David Shaw
David Shaw on 10 Sep 2017
Edited: David Shaw on 10 Sep 2017
I have played a little with two a image scheme to represent data as 3D.
I find that with the perspective view on, I can get very good results with about 5 degree rotation.
Here is some very simple code that demonstrates the idea.
% A quick demonstration of how to represent surface data as
% a stereo image pair.
% From Matlab documentation we use peaks
close all;
[X,Y,Z] = peaks(20);
figure('Position',[200 200 1000 400]);
subplot(1,2,1)
surf(X,Y,Z);
camproj('perspective');
view(45,30);
subplot(1,2,2);
surf(X,Y,Z);
camproj('perspective');
view(40,30);
Simply cross your eyes to view the stereoscopic view. Look at the left image with your right eye and vis versa. No glasses needed.
Good luck, David

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!