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

Info icon This 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,:));
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern