diff --git a/assests/CS 184_284A Rasterizer.pdf b/assests/CS 184_284A Rasterizer.pdf new file mode 100644 index 0000000..09e81ca Binary files /dev/null and b/assests/CS 184_284A Rasterizer.pdf differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-completed.png b/hw2/Images/Task1/sp24-bezier-task1-completed.png new file mode 100644 index 0000000..adfa3ca Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-completed.png differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-curve.png b/hw2/Images/Task1/sp24-bezier-task1-curve.png new file mode 100644 index 0000000..0a19f10 Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-curve.png differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-modified.png b/hw2/Images/Task1/sp24-bezier-task1-modified.png new file mode 100644 index 0000000..0bb5a5e Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-modified.png differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-step1.png b/hw2/Images/Task1/sp24-bezier-task1-step1.png new file mode 100644 index 0000000..c60919f Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-step1.png differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-step2.png b/hw2/Images/Task1/sp24-bezier-task1-step2.png new file mode 100644 index 0000000..b778f3a Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-step2.png differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-step3.png b/hw2/Images/Task1/sp24-bezier-task1-step3.png new file mode 100644 index 0000000..e7d3d45 Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-step3.png differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-step4.png b/hw2/Images/Task1/sp24-bezier-task1-step4.png new file mode 100644 index 0000000..b9e7303 Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-step4.png differ diff --git a/hw2/Images/Task1/sp24-bezier-task1-step5.png b/hw2/Images/Task1/sp24-bezier-task1-step5.png new file mode 100644 index 0000000..7024397 Binary files /dev/null and b/hw2/Images/Task1/sp24-bezier-task1-step5.png differ diff --git a/hw2/Images/Task2/sp24-bezier-task2-teapot.png b/hw2/Images/Task2/sp24-bezier-task2-teapot.png new file mode 100644 index 0000000..98f53b6 Binary files /dev/null and b/hw2/Images/Task2/sp24-bezier-task2-teapot.png differ diff --git a/hw2/Images/Task3/sp24-bezier-task3-default.png b/hw2/Images/Task3/sp24-bezier-task3-default.png new file mode 100644 index 0000000..c7df092 Binary files /dev/null and b/hw2/Images/Task3/sp24-bezier-task3-default.png differ diff --git a/hw2/Images/Task3/sp24-bezier-task3-no-mesh-default.png b/hw2/Images/Task3/sp24-bezier-task3-no-mesh-default.png new file mode 100644 index 0000000..5945dc0 Binary files /dev/null and b/hw2/Images/Task3/sp24-bezier-task3-no-mesh-default.png differ diff --git a/hw2/Images/Task3/sp24-bezier-task3-no-mesh-phong.png b/hw2/Images/Task3/sp24-bezier-task3-no-mesh-phong.png new file mode 100644 index 0000000..3feecdb Binary files /dev/null and b/hw2/Images/Task3/sp24-bezier-task3-no-mesh-phong.png differ diff --git a/hw2/Images/Task3/sp24-bezier-task3-phong.png b/hw2/Images/Task3/sp24-bezier-task3-phong.png new file mode 100644 index 0000000..25ce365 Binary files /dev/null and b/hw2/Images/Task3/sp24-bezier-task3-phong.png differ diff --git a/hw2/Images/Task4/sp24-bezier-task4-after-flip.png b/hw2/Images/Task4/sp24-bezier-task4-after-flip.png new file mode 100644 index 0000000..aa695d7 Binary files /dev/null and b/hw2/Images/Task4/sp24-bezier-task4-after-flip.png differ diff --git a/hw2/Images/Task4/sp24-bezier-task4-before-flip.png b/hw2/Images/Task4/sp24-bezier-task4-before-flip.png new file mode 100644 index 0000000..d981ceb Binary files /dev/null and b/hw2/Images/Task4/sp24-bezier-task4-before-flip.png differ diff --git a/hw2/Images/Task4/sp24-bezier-task4-flip-diagram.jpg b/hw2/Images/Task4/sp24-bezier-task4-flip-diagram.jpg new file mode 100644 index 0000000..9f5bfe2 Binary files /dev/null and b/hw2/Images/Task4/sp24-bezier-task4-flip-diagram.jpg differ diff --git a/hw2/Images/Task4/sp24-bezier-task4-incorrect.png b/hw2/Images/Task4/sp24-bezier-task4-incorrect.png new file mode 100644 index 0000000..3cd0175 Binary files /dev/null and b/hw2/Images/Task4/sp24-bezier-task4-incorrect.png differ diff --git a/hw2/Images/Task5/sp24-bezier-task5-after-flip-split.png b/hw2/Images/Task5/sp24-bezier-task5-after-flip-split.png new file mode 100644 index 0000000..e2672a6 Binary files /dev/null and b/hw2/Images/Task5/sp24-bezier-task5-after-flip-split.png differ diff --git a/hw2/Images/Task5/sp24-bezier-task5-after-split.png b/hw2/Images/Task5/sp24-bezier-task5-after-split.png new file mode 100644 index 0000000..cc862df Binary files /dev/null and b/hw2/Images/Task5/sp24-bezier-task5-after-split.png differ diff --git a/hw2/index.html b/hw2/index.html index 13b7846..98c3aaf 100644 --- a/hw2/index.html +++ b/hw2/index.html @@ -1,7 +1,696 @@ - -
- - - Homework 2 index.html here - + + + + + + + ++ In this project, I explored the world of mesh editing through building Bezier curves and surfaces using the + de Casteljau algorithm and implementing various mesh operations such as area-weighted vertex normals, edge + flip, edge split, and loop subdivision. +
++
t
, a
+ proportion
+ of length along the line and evaluates a
+ Bezier curve by recursively interpolating between each pair of control points. It can repeat this
+ process until the criterion has been met or that the final interpolated point has been calculated.
+ By
+ adjusting this parameter t
, it can find all the points along the curve. I implemented
+ this
+ algorithm by looping through each point and its adjacent point, \(p_i\) and \(p_{i+1}\), and
+ computing the interpolated point \(p_i^{'} = \text{lerp}(p_i, p_{i + 1}, t) = (1 - t) p_i + t p_{i +
+ 1}\). After each iteration, there will be one fewer control point than the previous iteration. This
+ process repeats until there is only one point left, which is the final evaluated point.
+ .bzc
files and create your own Bezier curve with 6 control
+ points of your choosing. Use this Bezier curve for your screenshots below.
+
+ +
+
+ |
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ +
+
+ |
+
+
+ |
+
+
vector
. The resulting \(n\) points became my next set of control pointers for another
+ Bezier curve in \(v\). This process repeats until the final point is
+ evaluated.
+ bez/teapot.bez
(not code)
evaluated by your implementation.
+ +
bez/teapot.bez
evaluated by my implementation of the Bezier
+ surface:
+
+
+ |
+
+
find_area
+ function
+ that used the cross product formula of the vertices to find the area of the triangle.
+ Here are the
+ formal steps I took to
+ implement the area-weighted vertex normals:
+ Vertex3D vertex
to keep track of the weighted vertex.
+ do-while
loop to traverse through all
+ the
+ triangles and stopping once we reached the original initial half-edge.
+ next
and
+ vertex
methods. I then found the difference vectors and took the cross product
+ before normalizing the result and dividing by 2 because the area of a triangle is half the
+ area
+ of the parallelogram formed by the vectors.
+ twin().next()
to find the next half-edge and face.
+ unit()
on it.
+ dae/teapot.dae
(not .bez
) comparing teapot shading with and
+ without vertex normals. Use Q to toggle default flat shading and Phong shading.
+ dae/teapot.dae
shading with and without vertex normals:
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
e0->isBoundary()
was true
to make sure to
+ never
+ flip a boundary edge and simply returned if it was.
+ twin()
and next()
methods. Each of these half-edges corresponded
+ to
+ the 10 half-edges, h0 ... h9
, as shown in the diagram above.
+ vertex()
method on
+ the
+ appropriate half-edge. Each of these vertices corresponded to the 4 vertices,
+ v0 ... v3
, as shown in the diagram above.
+ edge()
+ and
+ face()
methods on the appropriate half-edge. Each of these edges and faces
+ corresponded to the 5 edges, e0 ... e4
, and 2 faces, f0, f1
, as
+ shown
+ in
+ the diagram above.
+ setNeighbors()
+ method
+ according to the diagram above.
+ e0
.
+ +
dae/teapot.dae
before and after some edge flips.
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
dae/teapot.dae
before and after some edge flips.
+
+
+ |
+
+
+ |
+
+
dae/teapot.dae
before and after some edge flips.
+
+
+ |
+
+
+ |
+
+ YOUR RESPONSE GOES HERE +
+
+ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
+