Keeping the cow the same size means keeping the visible width constant:
width / 2 = distance * tan(fov / 2), so
distance = (width / 2) / tan(fov / 2) with width = 5.
4 vertices and 4 triangle faces — each face leaves out one vertex.
8 vertices and 12 triangle faces, two triangles per square side.
I used color1 = [0.0, 0.0, 1.0] (blue) for the front of the cow
(smallest z) and color2 = [1.0, 0.0, 0.0] (red) for the back of the cow
(largest z), interpolated per vertex with
alpha = (z - z_min) / (z_max - z_min).
PyTorch3D maps the world into the camera frame with
X_cam = X_world @ R + T; in the image the camera +x points left and
+y points up.
| Result | R_relative | T_relative | What it does |
|---|---|---|---|
![]() |
[[ 0, 1, 0], [-1, 0, 0], [ 0, 0, 1]] |
[0, 0, 0] |
Rotates the camera 90 degrees about its own viewing (z) axis. The camera does not move, so only the image is rolled. |
![]() |
identity | [0, 0, 2] |
Moves the camera back along its viewing direction, from distance 3 to 5, so the cow looks smaller. |
![]() |
identity | [0.5, -0.5, 0] |
Slides the camera in its own image plane, shifting the cow left and down. |
![]() |
[[ 0, 0, 1], [ 0, 1, 0], [-1, 0, 0]] |
[-3, 0, 3] |
Rotates 90 degrees about the world up (y) axis to view the cow from the side. The translation puts the camera back at distance 3 after the rotation. |
First image, second image, and the union of the two:
The torus is sampled from
x = (R + r cos(theta)) cos(phi),
y = (R + r cos(theta)) sin(phi),
z = r sin(theta) on a 200x200 grid of (phi, theta), with
R = 1 and r = 0.4, colored by position. The hole lies along z, so it comes into full
view twice per revolution.
For a new object, a wavy torus: the same parameterization with the ring radius
oscillating, ring = R + 0.3 cos(3 phi), giving
x = (ring + r cos(theta)) cos(phi),
y = (ring + r cos(theta)) sin(phi),
z = r sin(theta) with R = 1, r = 0.3. The cos(3 phi) term
makes the three lobes.
The same torus as the zero level set of
(sqrt(x^2 + y^2) - R)^2 + z^2 - r^2, with R = 1 and r = 0.4, evaluated on a
96^3 voxel grid and turned into a mesh with marching cubes.
Mesh vs. point cloud.
A new implicit object: the tanglecube,
x^4 - 5x^2 + y^4 - 5y^2 + z^4 - 5z^2 + 11.8 = 0, on a 128^3 grid over
[-3, 3]^3. It is genus 5, a rounded cube with a hole through each face.
A cow and its mirror image, joined hoof to hoof into a single mesh.
Original mesh on the left, sampled point cloud on the right.
| 10 points | 100 points |
|---|---|
![]() |
![]() |
| 1000 points | 10000 points |
![]() |
![]() |
At 10000 samples the cloud is nearly indistinguishable from the mesh; 10 or 100 points only hint at the shape.