yoda - Find minimum y value in the model axisValues = axis...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% YODA Load low or high resolution model of Yoda character. % and rotate model about x, y, or z axis. % % Code created by Tim Chartier - June 2006 % Models created by Kecskemeti B. Zoltan. % Images courtesy of Lucasfilm LTD. %% Load the model/tessellation information load yodapose_low % load yodapose % uncomment to use higher resolution model of Yoda %% Create initial plot Vt = V; clf patch('Vertices',Vt,'Faces',F3,'FaceColor',[.76 .87 .78]); patch('Vertices',Vt,'Faces',F4,'FaceColor',[.76 .87 .78]); axis tight equal vis3d drawnow %% Create translation matrix slides = 24; % Create the translation matrix yMinValue = min(V(:,2,:));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % Find minimum y value in the model axisValues = axis; % Get the min and max values on each axis yAxesMax = axisValues(4); % Get the upper limit on the y-axis shift = (yAxesMax - yMinValue)/slides; % Create a shift that % will have animation exit axes on last frame [n,m] = size(V); T = [zeros(n,1),shift*ones(n,1),zeros(n,1)]; % translation matrix %% Animate translation for i=1:slides Vt = Vt + T; cla patch('Vertices',Vt,'Faces',F3,'FaceColor',[.76 .87 .78]); patch('Vertices',Vt,'Faces',F4,'FaceColor',[.76 .87 .78]); axis(axisValues) drawnow end...
View Full Document

This note was uploaded on 12/08/2009 for the course AMATH 10211 taught by Professor Annegreenbaum during the Spring '09 term at University of Washington.

Ask a homework question - tutors are online