Folder structure:
ROOT
├── data
│ └── ...
├── images
│ └── ...
├── __init__.py
├── README.md
├── requirements.txt
├── starter
│ └── ...
└── yukunx_code_proj1
├── data
│ ├── Castle.obj
│ └── Dragon.obj
├── images
│ ├── 1-1-360-degree-renders.gif
│ ├── 1-2-dolly-zoom.gif
│ ├── 2-1-tetrahedron.gif
│ ├── 2-2-cube.gif
│ ├── 3-re-texturing-a-mesh.gif
│ ├── 4-textured_cow_transform0.jpg
│ ├── 4-textured_cow_transform1.jpg
│ ├── 4-textured_cow_transform2.jpg
│ ├── 4-textured_cow_transform3.jpg
│ ├── 5-1-1-point-cloud-first-two-images.gif
│ ├── 5-1-point-cloud-first-image.gif
│ ├── 5-1-point-cloud-second-image.gif
│ ├── 5-2-torus-point-cloud.gif
│ ├── 5-3-torus-implicit-surface.gif
│ ├── 6-fun.gif
│ ├── 7-sampling-cow-points-10000.gif
│ ├── 7-sampling-cow-points-1000.gif
│ ├── 7-sampling-cow-points-100.gif
│ └── 7-sampling-cow-points-10.gif
├── __init__.py
├── main.py
└── README.md
In total, there’re 4 vertices and 4 triangle faces.
In total, there’re 8 vertices and 12 triangle faces.
color0=[1.0, 1.0, 0.0]
color1=[0.0, 1.0, 1.0]
R_relative= Rotation.from_euler('z', -90, degrees=True).as_matrix()
T_relative=[0, 0, 0]
R_relative = [1, 0, 0], [0, 1, 0], [0, 0, 1]]
T_relative = [0.0, 0.0, 2.0]
R_relative= Rotation.from_euler('y', 3, degrees=True).as_matrix(),
T_relative= [0.2, -0.5, 0.0]
R_relative= Rotation.from_euler('y', 90, degrees=True).as_matrix(),
T_relative= [-3.0, 0.0, 3.0]
Comparing rendering torus with a point cloud and a implicit surface, the former one is much faster, because their time complexities are respectively quadratic and cubic to the adjacent element distance. Besides, the resultant surface of the former method perfectly matches the torus geometry, while marching cube algorithm generates torus with two spurious bulges. As for the advantage of the implicit surface, the marching cube method directly provides dense meshes, while point clouds require an extra reconstruction step to achieve that.
A dragon and a castle obj file were downloaded from Free3D. I merged their mesh vertices and faces together, and rendered them with different texture colors. Further, I tuned the transformation of the dragon to let it sit on top of the castle.
Original mesh | Point cloud with 10 points |
---|---|
![]() |
![]() |
Original mesh | Point cloud with 100 points |
---|---|
![]() |
![]() |
Original mesh | Point cloud with 1000 points |
---|---|
![]() |
![]() |
Original mesh | Point cloud with 10000 points |
---|---|
![]() |
![]() |