%% Create a Canvas That Displays in a Figure
% Create and open a vrworld object.

myWorld = vrworld('vrlights');
open(myWorld);

%
% Create a figure to use as the parent of the canvas. Create a canvas. Use a figure as the parent and specify the position.

fig = figure;
myCanvas = vr.canvas(myWorld,'Parent',fig,'Units',...
'normalized','Position',[0 0 1 1]);

%
% Copyright 2012 The MathWorks, Inc.