# Boxels Assignment

In this project, you will create an application that renders "boxel" sculptures. A sculpture made of boxels is an approximation of a real-life object using only box primitives. The locations, sizes, and colors of a sculpture's boxes are stored in a text file that your renderer reads in. This project draws inspiration from an assignment by graphics researcher Morgan McGuire.

## Later-week Submission Requirements

You must complete these requirements by the assignment's due date to be eligible for later-week submission:

• Create your project in a folder named boxels in the single Git repository that you are using for all your projects.
• Render a Blinn-Phong shaded cube using a perspective projection.
• Allow the user to rotate the cube using the cursor keys. Each new rotation must build on the last. That is, the transformation chain should effectively be this matrix multiplication, with matrix $$\mathbf{R}_0$$ being the first rotation applied: $$\mathbf{R}_{n} \times \mathbf{R}_{n - 1} \times \ldots \times \mathbf{R}_1 \times \mathbf{R}_0$$ Accumulate these rotations in a single matrix; do not store them as an array.
• Share in the #boxels channel a video of your rotating cube. This requirement is waived if you will meet the full credit requirements by the due date.
• Commit and push your code to your Git repository no matter what state it is in.

If you meet these requirements, you may turn your complete project in during some later week of the semester.

## Full Credit Requirements

You must complete these requirements in addition to the later-week submission requirements to receive credit for the assignment:

• Using fetch, read in a sculpture description file formatted like this:
0 0 0   2 3 4   1 0 0
0 5 0   1 1 1   0 1 0
...
Each line is nine numbers. The first three specify the x-, y-, and z-coordinates of the box's center. The middle three specify the box's width, height, and depth. The last three specify it's RGB color.
• Shift the loaded sculpture so that it renders in the center of the viewport. In other words, its x- and y-coordinates in world space are $$\begin{bmatrix}0&0\end{bmatrix}$$.
• Size the viewing frustum so that it is large enough to show the whole sculpture. When the sculpture is rotated, no portion is clipped.
• Design two sculptures in the shape of real-life objects. The sculptures must be made of boxes of various sizes and positions. The boxes must not all live in the same line or plane. Each sculpture must be unique amongst both your own sculptures and others'.
• Share in #boxels videos of your two rendered sculptures and their accompanying plain text files.
• Ensure that you can load others' designs into your renderer and reproduce their results.
• Your code must be cleanly formatted, the variable names must be meaningful, and comments should explain non-obvious code.
• Your Git log should reveal a steady pattern of commits. In general, you should commit and push after every work session.

When you are ready to claim your credit, send your instructor a direct message. Ensure that all requirements have been met. If they have not, you will not receive credit and will have to submit again some other week.