Using the Force of Math in Star Wars
by Timothy P. Chartier, Davidson College

Acknowledgements

Models created by Kecskemeti B. Zoltan and visualized by T. Chartier. Images courtesy of Lucasfilm LTD.

Introduction

This web page and the associated article (Using the Force: Star Wars in the Classroom by T. Chartier submitted to Primus in June of 2006) makes mathematical connections to the special effects used to digitally create the character of Yoda. This Jedi master first appeared in the Star Wars saga in the 1980 film, The Empire Strikes Back. In this film, Yoda's voice and movements were controlled by Frank Oz, as the character was a puppet. More recently, computer animation produced the character's movement, which required mathematical concepts from such areas as linear algebra, calculus, differential equations, and numerical analysis. Drawing on these popular culture ties in appropriate coursework can pique students' curiosity and compel further learning.

A Linear Algebra Physique

Yoda has a physique that is literally built for linear algebra. In order to operate this Jedi master by a computer as opposed to the hand of a puppeteer, the character must be digitally created via a wireframe or tessellation as seen above. The picture above is a detail of a model that uses 53,756 vertices. Below is a model containing 33,862 vertices. Note the additional smoothness resulting from the additional vertices. Both models are available below. The graphics on this web page required two pieces of information -- the location of each vertex and the vertices that determine each face. Armed with vertex and face information, we can move Yoda using simple matrix multiplication. Let V be the 33,862 by 3 matrix associated with the wireframe seen to the right. Note that row i of V contains the x, y and z coordinates of the ith vertex in the model. The image can be rotated by t radians about the y-axis by multiplying V with Ry where

The necessary computation is much larger than those generally performed in linear algebra classes. Since V and Ry are 33,862 by 3 and 3 by 3 matrices, respectively, one rotation of the image requires 304,758 multiplications. The resources below will allow for the visualization of Yoda in MATLAB and/or Mathematica. A PDF document is also supplied with slides suitable for projection in class. Finally, it should be noted that the Primus article cited above goes into further detail of the mathematics behind the digitized Yoda, making connections to calculus, differential equations and numerical analysis. An alternative resource is the article, "Mathematical Movie Magic," by T. Chartier and D. Goldman printed in the April 2004 issue of Math Horizons.

Resources

Presentation resource Matlab resources

Run yoda.m to visualize lower resolution wireframe. Comments within the M-file describe how to load and visualize the higher resolution wireframe of Yoda.

Mathematica resources

Note, visualization using hidden surface removal takes considerably more time in Mathematica than Matlab.

Maple resources

The code is currently set up to run on the lower resolution data.


Last edited in October 2006