%% Position Camera to View Object
% Create three spheres. Then set the data aspect ratio, the view, and the projection type.

[x,y,z] = sphere;
s1 = surf(x,y,z);
hold on
s2 = surf(x+3,y,z+3);
s3 = surf(x,y,z+6);

daspect([1 1 1])
view(30,10)
camproj perspective

%
% Compose the scene around sphere s1.

camlookat(s1)

%
% Compose the scene around sphere s2.

camlookat(s2)

%
% Compose the scene around sphere s3.

camlookat(s3)

% Copyright 2012 The MathWorks, Inc.