aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2024-04-05 23:44:46 -0400
committersotech117 <michael_foiani@brown.edu>2024-04-05 23:44:46 -0400
commit33da8e058fdb9eec8bccc820b3b79993b505fc61 (patch)
treea821d151ac504362e4af45c34637d91b26708902
parent4603c1672a97753c728e087d85db5f79c8884fe2 (diff)
rerender videos and update readme
-rw-r--r--README.md11
-rw-r--r--readme-videos/bunny-conc.gifbin13272617 -> 18474904 bytes
-rw-r--r--readme-videos/bunny-norm.gifbin10736071 -> 18446640 bytes
-rw-r--r--src/arap.cpp8
4 files changed, 12 insertions, 7 deletions
diff --git a/README.md b/README.md
index 8642ed7..8f1fb63 100644
--- a/README.md
+++ b/README.md
@@ -92,9 +92,14 @@ For this project, we ask that you demonstrate to us that your program achieves t
For the solving algorithm, I divided the dimensions and parallelized my code using the QTFramework to concurrently calculate the estimated positions.
See line 286 in arap.c for the implementation.
The video below shows both implementations (concurrent and normal) when deforming bunny.obj, a large mesh, at 1000 iterations.
-It appears the concurrent implementation is faster by only about a second.
+For this case, it appears the concurrent implementation is faster by 2 seconds (9sec vs 11sec).
| Program Specification | Video |
|:------------------------------------------------------------------|:------------------------------------|
-| Modifying Peter at 1000 iterations with no concurrent framework. | ![](./readme-videos/bunny-conc.gif) |
-| Modifying Peter at 1000 iterations using QTConcurrent map-reduce. | ![](./readme-videos/bunny-norm.gif) |
+| Modifying Bunny at 1000 iterations with no concurrent framework. | ![](./readme-videos/bunny-conc.gif) |
+| Modifying Bunny at 1000 iterations using QTConcurrent map-reduce. | ![](./readme-videos/bunny-norm.gif) |
+
+### Citations/references
+- https://igl.ethz.ch/projects/deformation-survey/deformation_survey.pdf for how to handle deformed triangles
+- https://github.com/cheind for how to create a space matrix efficiently using triplets
+- github co-pilot was enabled in my clion ide for code suggestions \ No newline at end of file
diff --git a/readme-videos/bunny-conc.gif b/readme-videos/bunny-conc.gif
index 459c927..388c3c0 100644
--- a/readme-videos/bunny-conc.gif
+++ b/readme-videos/bunny-conc.gif
Binary files differ
diff --git a/readme-videos/bunny-norm.gif b/readme-videos/bunny-norm.gif
index 4774bbb..697a7b3 100644
--- a/readme-videos/bunny-norm.gif
+++ b/readme-videos/bunny-norm.gif
Binary files differ
diff --git a/src/arap.cpp b/src/arap.cpp
index 0dcaefd..92ea21d 100644
--- a/src/arap.cpp
+++ b/src/arap.cpp
@@ -17,8 +17,8 @@ ARAP::ARAP() {}
void ARAP::init(Eigen::Vector3f &coeffMin, Eigen::Vector3f &coeffMax)
{
- m_num_iterations = 5;
- m_mesh_path = "meshes/peter.obj";
+ m_num_iterations = 1000;
+ m_mesh_path = "meshes/bunny.obj";
vector<Vector3f> vertices;
vector<Vector3i> triangles;
@@ -46,8 +46,8 @@ void ARAP::move(int vertex, Vector3f targetPosition)
std::vector<Eigen::Vector3f> new_vertices = m_shape.getVertices();
const std::unordered_set<int>& anchors = m_shape.getAnchors();
- std::cout << "anchors size" << anchors.size() << std::endl;
- std::cout << "targetPosition" << targetPosition << std::endl;
+// std::cout << "anchors size" << anchors.size() << std::endl;
+// std::cout << "targetPosition" << targetPosition << std::endl;
// TODO: implement ARAP here
new_vertices[vertex] = targetPosition;