Sunday, August 11, 2024
HomeMatlabR2-D2, Rotations and Dilations in Two Dimensions » Cleve’s Nook: Cleve Moler...

# R2-D2, Rotations and Dilations in Two Dimensions » Cleve’s Nook: Cleve Moler on Arithmetic and Computing

R2_D2 is is the title I’ve given a brand new MATLAB program that gives animations of 2-by-2 rotation and dilation matrices. I admit I selected “dilations” so the acronym can be memorable, however in any other case the code has little to do with the well-known Star Wars droid.

### Contents

#### Home

This define of a home is featured in Experiments with MATLAB. The info are the 11 blue dots. The coordinates of every dot type a 2-by-1 vector; the 2-by-2 rotation and dilation matrices multiply every of those vectors individually. (The strains between the dots full the image and should not concerned in any computation.)

The home additionally seems in a number of editions of Gil Strang’s textbooks. The duvet of the third version of Strang’s Introduction to Linear Algebra options 9 homes on a quilt made by Gil’s good friend Chris Curtis.

#### Hand

This define of a hand, which I constructed from measurements of my very own hand, can be utilized in Experiments with MATLAB. There are 37 factors, so Hand is a 2-by-37 matrix.

#### Rotation

Multiplication by this matrix produces a two-dimensional rotation by an angle theta.

\$\$ R = left(
start{array}{rr}
cos{theta} & sin{theta}
– sin{theta} & cos{theta}
finish{array}
proper) \$\$

#### Dilation

Dilation is the method of constructing objects bigger or smaller. Multiplication by this diagonal matrix produces a dilation by an element sigma.

\$\$ S = left(
start{array}{rr}
sigma & 0
0 & sigma
finish{array}
proper) \$\$

#### R2_D2

While you run R2_D2 by yourself laptop, you may drive the rotations and dilations your self. Mousing exterior of the article creates rotation and mousing inside produces dilation.

If you’re not aware of matrices, or simply need a fast refresher, try the Matrices chapter of Experiments with MATLAB. Train 4.14 is especially useful.

Printed with MATLAB® R2023a

RELATED ARTICLES