16825 HW1 - Yuchen Zhang

from IPython.display import Image
from matplotlib import pyplot as plt

Q1.1 - 360-degree Renders

Image(filename="images/q1/cow_render.gif")

Q1.2 Re-creating the Dolly Zoom

Image(filename="images/q1/dolly_zoom.gif")

Q2 - Tetrahedron and Cube

Number of vertices and face:

from IPython.display import HTML

HTML('''
<div style="display:flex; justify-content:space-around;">
  <img src="images/q2/tetrahedron_render.gif" width="200"/>
  <img src="images/q2/cube_render.gif" width="200"/>
</div>
''')

Q3 - Re-texture a mesh

color1 = [0.0, 0.8, 0.0], pure green | color2 = [0.0, 0.0, 0.8], pure blue

Image(filename="images/q3/retexture.gif")

Q4 - Camera Transformations

  1. R = [[0, 1, 0], [-1, 0, 0], [0, 0, 1]], T = [0,0,0]
  2. R = [[1, 0, 0], [0, 1, 0], [0, 0, 1]], T = [0, 0, 3]
  3. R = [[1, 0, 0], [0, 1, 0], [0, 0, 1]], T = [0.5, 0, 0]
  4. R = [[0, 0, 1], [0, 1, 0], [-1, 0, 0]], T = [-3, 0, 3]
fig, axs = plt.subplots(2, 2, figsize=(10, 10))

axs[0, 0].imshow(plt.imread("images/q4/transform_config1.jpg"))
axs[0, 0].set_title("Config 1")
axs[0, 1].imshow(plt.imread("images/q4/transform_config2.jpg"))
axs[0, 1].set_title("Config 2")
axs[1, 0].imshow(plt.imread("images/q4/transform_config3.jpg"))
axs[1, 0].set_title("Config 3")
axs[1, 1].imshow(plt.imread("images/q4/transform_config4.jpg"))
axs[1, 1].set_title("Config 4")

plt.show()

Q5.1 - Rendering Point Clouds from RGB-D Images

image 1 | image 2 | image 1 + 2

from IPython.display import HTML

HTML('''
<div style="display:flex; justify-content:space-around;">
  <img src="images/q5/pcd_render_0.gif" width="200"/>
  <img src="images/q5/pcd_render_1.gif" width="200"/>
  <img src="images/q5/pcd_render_2.gif" width="200"/>
</div>
''')

Q5.2 Parametric Functions

We rendered both the sphere and a custom object with point-cloud mode. Each object is rendered with 100 and 1000 points.

from IPython.display import HTML

HTML('''
<div style="display:flex; justify-content:space-around;">
  <img src="images/q5/sphere_parametric_100.gif" width="200"/>
  <img src="images/q5/sphere_parametric_1000.gif" width="200"/>
</div>
<div style="display:flex; justify-content:space-around;">
  <img src="images/q5/custom_parametric_100.gif" width="200"/>
  <img src="images/q5/custom_parametric_1000.gif" width="200"/>
</div>
''')

5.3 Implicit Surfaces

Rendering with implicit v.s. perametric representations

from IPython.display import HTML

HTML('''
<div style="display:flex; justify-content:space-around;">
  <img src="images/q5/sphere_implicit_100.gif" width="200"/>
  <img src="images/q5/custom_implicit_100.gif" width="200"/>
</div>
''')

Q6 - Something Fun

I downloaded a model from printables, a 3D printing model website, and rendered it.

from IPython.display import HTML

HTML('''
<div style="display:flex; justify-content:space-around;">
  <img src="images/q6/whistle_render.gif" width="200"/>
</div>
''')