# Assignment 3: Animation

Out: Apr 30. Due: May 09.

### Introduction

In your third assignment, you will perform basic tasks in interactive rendering related to animation. This is a shorter assignment than usual.

You are to perform this assignment using C++. To ease your development, we are providing a C++ framework to load a scene, perform basic mathematical calculations, and save your image results. Included with the framework are scene files in JSON file format, the correct output images, and scripts to generate the output images from the scene files.

Also you can use the layout of the code as an indication of how to structure your code. We have removed the code of each of the functions you are expected to fill in. If you feel this structure does not suit your needs, feel free to change it, but please leave comments as to what your new functions are meant to do to help us evaluate your code in case of errors.

We also provide a reference executable for OS X and Win32. You can use these to interactively check whether your solution meets the requirements. You can run the program interactively by calling it with the filename. When running, hit h for help.

The final result of this assignment is a simple ray tracer with support for the following features:

• Keyframing
• Implemented Keyframed Transforms based on linear or Bezier curves
• Skinning
• Implement skinning for a simple shape

### Requirements

Search for the function not_implemented_warning to know what parts you are required to implement. In implementing these requirements, do not worry about malformed input. Below is a itemized summary of these requirements.

1. Keyframed Values. Implement keyframe interpolation of vec3f values. The keyframed values are general Bezier values. Note that there is a degree variable that indicates the polynomial degree of the segments. In the examples we will try, please assume that these are linear, so two control points for each segment.

2. Skinning. You will implemented mesh skinning by computing the frames and transforming points and normals. First, compute the reference and bone frame. Then apply them to the positions and normals using the given weights. Normals are transformed just like points, but they need to be normalized at the end.

3. Hierarchical Transforms. Bones frames are hierarchical. You will find that there is a parent index for each bone. That means that the bone frames are written with respect to the frames of the parent. Implement a function that computes the current bone weights apply the hierarchy too. You can assume that a parent will always come before a child in the bine array.

### Submission

Please send your code as well as the images generated by your code to pellacini-at-di-dot-uniroma1-dot-it. We will run your code by calling the main method provided. We will your images for correctness with ours.

### Extra Credit

1. Implement a Particle System that randomly creates and deletes particles. We left code for this in the system as well as a scene for testing. This is a lot of fun, but is considered extra credit since the home work is shorter. Contact the Professor for more details.
2. Implement Coth simulation by setting up the spring system. Contact the Professor for more details.