1.1 360 degree renders

360 gif cow mesh

1.2 re-creating the dolly zoom

dolly zoom cow mesh

2.1 Constructing a Tetrahedron

Tetrahedron

How many vertices and triangle faces your mesh should have? four vertices, adn four triangle faces.

2.2 Constructing a cube

cube

How many vertices and triangle faces your mesh should have? 8 vertices for the cube. As there are six faces of the cube, each square consists of two triangle, so 12 triangle faces.

  1. Re-texturing a mesh

Retexture

I did the exact opposite, blue at the back and red in the front. Color 1 = '[1, 0, 0]' Color 2 = '[0, 0, 1]'

  1. Camera Transformations

camera transformation

Describe in wrods what R relative and T relative should be doing and include the rendering produced by your choice of R relative and T relative

For this part, I modified the camera extrinsics using several choices of relative rotation and translation. One complication is that I normally structure my camera transformations using the standard column-vector world-to-camera convention, while PyTorch3D stores its rotation matrix using the transposed, row-vector convention.

The convention I normally use is

$\mathbf{x}_c = R_{wc}\mathbf{x}_w + \mathbf{t},$

where:

  • $R_{wc}$ transforms coordinates from the world frame into the camera frame.
  • $\mathbf{t}$ is the world-to-camera translation.
  • If the physical camera center in world coordinates is $\mathbf{C}$, then

$\mathbf{t} = -R_{wc}\mathbf{C}.$

In this convention, I construct the rotation matrix column-wise:

$$ R_{wc} = \begin{bmatrix} | & | & |\\ \mathbf{x}_w^{(c)} & \mathbf{y}_w^{(c)} & \mathbf{z}_w^{(c)}\\ | & | & | \end{bmatrix}, $$

so the first column is the world $+X$ axis expressed in camera coordinates, the second column is world $+Y$, and the third column is world $+Z$.

PyTorch3D instead uses the equivalent row-vector form

$\mathbf{x}_c^T = \mathbf{x}_w^T R_{\text{p3d}} + T_{\text{p3d}},$

so the conversion I used is

$\boxed{R_{\text{p3d}} = R_{wc}^T}$ and $\boxed{T_{\text{p3d}} = \mathbf{t}}.$

The starter code introduces one additional layer because I specify R_relative and T_relative, which are composed with the baseline camera

$ R_{\text{base}} = I, \qquad T_{\text{base}} = \begin{bmatrix} 0\\0\\3 \end{bmatrix}. $

The code computes

$ R_{\text{p3d}} = R_{\text{relative}}R_{\text{base}} $

and

$$ T_{\text{p3d}} = R_{\text{relative}}T_{\text{base}} + T_{\text{relative}}. $$

Since $R_{\text{base}}=I$, $R_{\text{p3d}} = R_{\text{relative}}.$

Therefore, if I first calculate a camera using my normal convention, I convert it to the values used by the starter code as

$\boxed{R_{\text{relative}} = R_{wc}^T}$

and

$$ \boxed{ T_{\text{relative}} = \mathbf{t} - R_{\text{relative}} \begin{bmatrix} 0\\0\\3 \end{bmatrix} }. $$

This distinction is important because T_relative in the code is not directly the physical camera position.


Results¶

Camera transformation results

The five panels show the baseline camera followed by the four transformations described below.

Case 4 — View from the Negative World X Side¶

For this case, I wanted the camera to view the object from the negative world $X$ direction, while keeping world $+Y$ pointing upward and world $+Z$ pointing to the right.

Using my usual column-vector world-to-camera convention,

$$ \mathbf{x}_c = R_{wc}\mathbf{x}_w + \mathbf{t}, $$

I want the world axes to map as

$$ +X_w \rightarrow +Z_c, \qquad +Y_w \rightarrow +Y_c, \qquad +Z_w \rightarrow -X_c. $$

Therefore, writing the world axes in camera coordinates column-wise gives

$$ R_{wc} = \begin{bmatrix} 0 & 0 & -1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{bmatrix}. $$

The physical camera center is

$$ \mathbf{C} = \begin{bmatrix} -3 \\ 0 \\ 0 \end{bmatrix}. $$

Using

$$ \mathbf{t}=-R_{wc}\mathbf{C}, $$

the translation in my normal convention is

$$ \mathbf{t} = \begin{bmatrix} 0 \\ 0 \\ 3 \end{bmatrix}. $$

PyTorch3D uses the transposed rotation convention, so

$$ R_{\text{p3d}} = R_{wc}^T = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end{bmatrix}, $$

with final translation

$$ T_{\text{p3d}} = \begin{bmatrix} 0 \\ 0 \\ 3 \end{bmatrix}. $$

Because the starter code computes

$$ T_{\text{p3d}} = R_{\text{relative}}T_{\text{base}} + T_{\text{relative}}, $$

where $T_{\text{base}}=[0,0,3]^T$, the values I actually provide to the starter code are $ R_relative = [ [0, 0, 1], [0, 1, 0], [-1, 0, 0], ]

T_relative = [-3, 0, 3]$

5.1 Rendering Point Clouds from RGB-D Images

Point Clouds

5.2 Parametric Functions

Torus

new object is a mobius strip.

Strip

5.3 Implicit Surfaces

Torus mesh

my new object is two sphere union like a peanut or dumbbell.

Two sphere mesh

Low density point clouds such as 10 or 100 samples provided only a rough outline indication of the cow's geometry, and increasing the number of samples progressively produced a more recognizable surface. The mesh remained visually continuous at all viewpoints because its triangular faces explicity cover the space between vertices. The tradeoff I observe is the simplicity of point based representation vs the surface continuity provided by meshes. A mesh can be more difficult to obtain than a pointcloud, although reasonably tesselated mesh can present a smooth surface with fewer primitives than a very dense point cloud.

  1. Do Something Fun

Saturn

Using the basis of spheres and torus, I rendered a pointcloud saturn with moon gif, consisting of the planet, ring, and then a moon.

  1. Sampling Points on Meshes Cow PointCloud