1. Practicing with Cameras
2. Practicing with Meshes
3. Re-texturing a Mesh
Color mapping (swapped):
front (z_min) uses color2, back (z_max) uses color1.
4. Camera Transformations
New extrinsics are formed as
R = R_relative @ R_0,
T = R_relative @ T_0 + T_relative.
R_relative rotates the original camera frame (yaw/pitch/roll);
T_relative then translates the camera in that rotated frame (dolly/slide) to keep framing sensible.
Chosen R_relative / T_relative (values)
# Base
R_rel = I_3
T_rel = [0, 0, 0]
# 4.1 Roll clockwise 90° about +Z
R_rel = [[ 0, 1, 0],
[-1, 0, 0],
[ 0, 0, 1]]
T_rel = [0, 0, 0]
# 4.2 Dolly out (farther)
R_rel = I_3
T_rel = [0, 0, +2.0]
# 4.3 Yaw left 10° about +Y
# c = cos(10°), s = sin(10°)
R_rel = [[ c, 0, s],
[ 0, 1, 0],
[ -s, 0, c]]
T_rel = [0, 0, 0]
# 4.4 Right-side view (quarter turn right) + reframe
R_rel = [[0, 0, 1],
[0, 1, 0],
[-1,0, 0]]
T_rel = [-3, 0, 3]
5. Generic 3D Representations
5.1 RGB-D → Point Clouds
5.2 Parametric Functions
5.3 Implicit Surfaces
Discussion (5.1–5.3)
RGB-D unprojection: For pixel (u,v) with depth d and intrinsics
(fx,fy,cx,cy):
X=((u-c_x)/f_x)·d, Y=((v-c_y)/f_y)·d, Z=d; convert via extrinsics to world.
Concatenating two views (union) densifies coverage and fills occlusions.
Parametric torus:
x=(R+r\cos v)\cos u, y=r\sin v, z=(R+r\cos v)\sin u.
Tilt camera (e.g., elev≈30°) so the hole is visible; procedural color for “chocolate glaze”.
Implicit torus mesh: Evaluate
F(x,y,z)=(\sqrt{x^2+z^2}-R)^2 + y^2 - r^2 on a voxel grid and extract the 0-level via marching cubes.
Higher voxel resolution → smoother mesh but more time/memory.
Point cloud vs. mesh: Points render fast and are easy to generate; silhouettes can look fuzzy unless point radius is tuned. Meshes give crisp silhouettes and standard shading; require topology; performance scales with face count.
6. Do Something Fun
7. Extra Credit — Sampling Points on Meshes