diff --git a/assets/CS-184-Mesh-Edit-Writeup.pdf b/assets/CS-184-Mesh-Edit-Writeup.pdf index 83793a4..b8d9877 100644 Binary files a/assets/CS-184-Mesh-Edit-Writeup.pdf and b/assets/CS-184-Mesh-Edit-Writeup.pdf differ diff --git a/hw2/index.html b/hw2/index.html index 21ddd6b..85be95e 100644 --- a/hw2/index.html +++ b/hw2/index.html @@ -78,6 +78,13 @@ margin-top: 5px; /* Add some margin above captions */ } + + .highlighter-rouge { + color: #b00505; + background-color: rgb(247, 222, 222); + border-radius: 4px; + padding: 3px; + }
- 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 can be repeated until there is only one point left, which would be the final evaluated point.
+ -
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 can be repeated until there is only one point left, which would be 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.
+
+ +
.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:
-
-
- |
-
+
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 dae
) 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.
-
-
- |
-
-
- |
-
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 not
- split 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
.
- 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.
-
-
- |
-
-
- |
-
+
+
+ |
+
+
+
+ |
+
e0->isBoundary()
was true
to make sure to not
+ split 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.
+
+
+ |
+
+
+ |
+
-
dae/beetle.dae
that depict before and after splitting the boundary edges:
-
-
- |
-
-
- |
-
+
+
+ |
+
+
- I decided to follow the order of operations as described in the spec. Here are the formal steps I took - to implement the loop subdivision: -
for
loop over the
- mesh.verticesBegin()
and mesh.verticesEnd()
iterators. For each vertex, I
- found all of the neighbors that were connected to it and then computed the new position by weighting
- it as the sum following the formula from lecture. I then set the vertex->newPosition
to
- this weighted position and the vertex->isNew
to false
because this was not
- a newly created vertex.
- for
loop over the
- mesh.EdgesBegin()
and mesh.EdgesEnd()
iterators. For each edge, I found
- the vertex and face that it was connected to and then computed the new position by weighting it as
- the sum following the formula from lecture. I then set the e->newPosition
to this
- weighted position and the e->isNew
to false
because this was not a newly
- created edge.
- +
dae/beetle.dae
that depict
+ before and after splitting the boundary edges:
+
+
+ |
+
+
+ |
+
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
+ I decided to follow the order of operations as described in the spec. Here are the formal steps I took + to implement the loop subdivision: +
for
+ loop over the
+ mesh.verticesBegin()
and mesh.verticesEnd()
+ iterators. For each vertex, I
+ found all of the neighbors that were connected to it and then computed the new position by weighting
+ it as the sum following the formula from lecture. I then set the vertex->newPosition
to
+ this weighted position and the vertex->isNew
to false
because this was not
+ a newly created vertex.
+ for
+ loop over the
+ mesh.EdgesBegin()
and mesh.EdgesEnd()
iterators. For each edge, I found
+ the vertex and face that it was connected to and then computed the new position by weighting it as
+ the sum following the formula from lecture. I then set the e->newPosition
to this
+ weighted position and the e->isNew
to false
because this was not a newly
+ created edge.
+ -
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
-
- |
-
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
- I did not implement any extra credit extensions. -
-+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ YOUR RESPONSE GOES HERE +
+ +
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
+ ++ Uniform Hemisphere Sampling + | ++ Light Sampling + | +
---|---|
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ YOUR EXPLANATION GOES HERE +
++ YOUR RESPONSE GOES HERE +
++ YOUR RESPONSE GOES HERE +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ YOUR EXPLANATION GOES HERE +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ YOUR EXPLANATION GOES HERE +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ YOUR EXPLANATION GOES HERE +
++ YOUR RESPONSE GOES HERE +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
diff --git a/hw3/Images/bunny.png b/hw3/Images/bunny.png new file mode 100644 index 0000000..186c627 Binary files /dev/null and b/hw3/Images/bunny.png differ diff --git a/hw3/index.html b/hw3/index.html index c30176b..9660533 100644 --- a/hw3/index.html +++ b/hw3/index.html @@ -1,7 +1,542 @@ - -
- -
+ + + +
+ + + +
+ + + + + + + + + +
+