CS 148 Fall 2020-2021 Due Date: Monday, 28 September 2020 by 7 pm PT

Follow the instructions carefully. If you encounter any problems in the setup, please do not hesitate to reach out to CAs on Piazza or attend office hours on Nooks.

Be aware of the Checkpoints below. Make sure you complete each one since we will do the grading based on them.

I. Objects and Transforms

<aside> 📖 In Blender, we can translate, rotate, and scale objects. We can also parent one object to another to move them around together. The "object space" and "world space" corresponds to "local coordinates" and "global coordinates" in Blender.

</aside>

First, add a cube to your scene. If you open Blender with the default scene, it should come with a cube already. You can use that cube for this part of the homework.

(Optional Reading) How to transform objects in Blender

<aside> 📖 If you are new to Blender, we recommend watching this video "Select & Transform" first before proceeding. You can skip this part if you are familiar with Blender.

</aside>

You can use the tools in the Toolbar of the 3D viewport: Move, Rotate, Scale, and Transform Tool to transform the object (fig 1). When you select an object, the orange dot indicates the origin of the object.

The keyboard shortcuts are G (for grab), R (for rotate), and S (for scale). You can press X, Y, or Z afterward to lock the transform to that specific axis. For example, if you press G, then X, then move your mouse, the object will only translate along the X-axis. You can also type in numbers after pressing the keys to specify the exact values you want to move, rotate, or scale. For example, if you press G, Z, 2, the object will translate 2 units along the Z-axis.

Make sure your cursor is in the 3D viewport area when pressing the keys. Blender uses cursor location to determine which area you want to send your keystrokes to.

You will be able to view/change the local transform of the object in two places: 1) the sidebar of the 3D viewport by pressing N, and 2) Property Editor (bottom right) ‣ Object Properties. Under Transform, you should see the Location, Rotation, and Scale of the active object (fig 2). You can change the values and see how the object changes. You can change the value by clicking on the value and dragging it left or right, or reset the value by hitting backspace. Remember these values specify the local transform, not global transform.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3fff508a-55f3-4abb-81b4-1c14a5d5f416/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3bd5c90e-ac76-4d39-811d-7eb19a04068e/Untitled.png

1. Order of Rotations

<aside> 📖 To explore the ideas we introduced in the lecture, we will first investigate why the order of rotation matters. You will calculate the rotation matrices and verify your result with one of the vertices on the cube.

</aside>

The default cube in Blender has a size of 2 units, which means its vertices are at locations of positive and negative 1s. We are going to use the vertex $v$ with location $p=\begin{pmatrix} 1\\1\\1 \end{pmatrix}$ (colored in red in fig 1) to see how rotations are constructed. The world (global) axis is shown by the navigation gizmo: X-axis points to the bottom left, Y-axis points to the bottom right, and Z-axis points upward.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/fac49946-4b05-4022-b6f1-d418da8fc9d1/Untitled.png

First, we rotate the cube along the global X-axis by $+45^\circ$. Then rotate along the global Y-axis by $+45^\circ$ (fig 2). Let $p_{xy}$ denote the world location of vertex $v$ after rotation. (Shortcut: R, X, 45, Enter. R, Y, 45, Enter)

Next, let us go back to the default cube, but this time, we rotate the cube along the global Y-axis first by $+45^\circ$. Then rotate along the global X-axis by $+45^\circ$ (fig 3). Let $p_{yx}$ denote the world location of vertex $v$ after rotation. (Shortcut: R, Y, 45, Enter. R, X, 45, Enter)