Creating a computer animation

GOAL: Create a computer animation using Matlab. You will be given template programs (and you should probably use them) such as the programs move.m, morpheme.m, Jpeg2PointsConverter2.m, moveOtto.m as a starting point, and then adapt the programs to create your animation. However, we will first start with something simple:

Math 645 Animation Assignment 1 Due March 25, 2020
This project will be worth 150 points and this is just the beginning part. Bonus points may be awarded.
GOAL: Create a computer animation using Matlab. You will be given template programs (and you should probably use them) such as the programs move.m, morpheme.m, Jpeg2PointsConverter2.m, moveOtto.m as a starting point,
and then adapt the programs to create your animation. However, we will first start with something simple:
(A) The first thing you should do is create a character. You can do this by using a computer tool to sketch the character or their outline. Or, you can download a character of your choice from the Web. Save the character as a .jpeg file to keep things simple. You might also want to figure out how to fill the character to create the desired coloration, etc.
As an example for you, I have placed the file CharlieBrown.jpg in the Matlab Files module on
Canvas. If you read in the picture using the command:

CB=imread(’CharlieBrown.jpg’);
(you might have to switch to the directory with the .jpg file to make it work), the net result is that
matrix CB will hold the RGB values for the Charlie Brown picture (it is actually a 3-D array, but
don’t worry about that for now). Next, run the CB matrix through the Jpeg2pointsConverter2
script using the command:
CBout = Jpeg2pointsConverter2(CB,220);
Note that 220 is the THRESHOLD value used by the Jpeg2pointsCoverter2 script. When you
choose your own character, you will have to see if the image looks OK and the number of total
points in the output matrix (CBout here) is only a few thousand. If you don’t like the resulting
image or it has too many points, try again with a different THRESHOLD value (higher THRESHOLD values give fewer points). You should read the help info at the top of Jpeg2pointsConverter
to see more details.
(B) For this first stage of your animation you should take your character and transform
it by each of these required matrix transform elements: (a) rotations, (b) shifts, (c) shears,
reflections, or rescalings, (d) transformations or alterations of your character such as a morph.
Show a before and after plot for each case, and record the transformation matrices (or morphing
rules if you use them).
(C) Make your character walk off the screen along some vector path. You can do this in
several ways, but in your write-up, be sure to explain the methods you used (for example, you can
use the homogeneous coordinates approach that was used in the moveN.m script; or, you can use
the matrix outer product approach that will be described in class).
This next part is more complicated, since it involves having your character away from the origin,
sitting somewhere in the “scene.” Then, since most of our transformations are defined around
the origin, you must (mathematically) transport your character to reference coordinates about the
origin, where you will transform it before placing it back in the scene. For your write-up of this
part, you should include your matlab code and explain the transformations that you used.
(D) For this more advanced part of your animation, I want you to write a matlab function/script that can take in a character located anywhere in a scene, transform it to reference
coordinates where you can perform transformations, then do the transformations and put the character back in the scene. You should take your character and transform it multiple times within
a for loop by at least two of these matrix transform elements : (a) rotations, (b) shears,
reflections, or rescalings, (c) other transformations/alterations or morphs of your character. Show
some plots to capture the action and include them in your write-up.
(E) We will try to find a time in class where you can demonstrate your animation (and this
will help me to assign bonus points).

This question has been answered.

Get Answer