Skip to content

Commit

Permalink
Update README and resize some vectors; add submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
nzfeng committed Feb 2, 2021
1 parent 456a7e2 commit 4a7cf1d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cd ddg-exercises/projects
```

Each project in `ddg-exercises/projects` builds its own executable when compiled. To
run a particular project `<project>`, go to the `projects/<project>` directory. First, compile using
run a particular project `<project>`, go to the `projects/<project>` directory. The basic process for compiling is as follows. First, compile using
```
mkdir build
cd build
Expand All @@ -31,6 +31,8 @@ which builds an executable `main` which can then be run using
bin/main <optional_path_to_a_mesh>
```

(See https://geometry-central.net/build/building/ for additional compiler flag options.)

## Dependencies (all included)

1. Geometry processing and linear algebra - [Geometry Central](https://github.com/nmwsharp/geometry-central), which in turn has dependencies on [Eigen](https://eigen.tuxfamily.org) and [Suitesparse](https://people.engr.tamu.edu/davis/suitesparse.html).
Expand Down
6 changes: 3 additions & 3 deletions projects/geodesic-distance/src/heat-method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ HeatMethod::HeatMethod(ManifoldSurfaceMesh* surfaceMesh, VertexPositionGeometry*

// TODO: Build Laplace and flow matrices.
// Note: core/geometry.cpp has meanEdgeLength() function
this->A = identityMatrix<double>(mesh->nVertices()); // placeholder
this->F = identityMatrix<double>(mesh->nVertices()); // placeholder
this->A = identityMatrix<double>(1); // placeholder
this->F = identityMatrix<double>(1); // placeholder
}

/*
Expand All @@ -40,7 +40,7 @@ FaceData<Vector3> HeatMethod::computeVectorField(const Vector<double>& u) const
Vector<double> HeatMethod::computeDivergence(const FaceData<Vector3>& X) const {

// TODO
return Vector<double>::Zero(mesh->nVertices()); // placeholder
return Vector<double>::Zero(1); // placeholder
}

/*
Expand Down
1 change: 1 addition & 0 deletions projects/geodesic-distance/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ void functionCallback() {
}
if (ImGui::Button("Reset")) {
polyscope::state::subset.vertices.clear();
polyscope::state::currVertexIndex = -1;
psMesh->setSurfaceColor({1.0, 0.45, 0.0});
solnColors->setEnabled(false);
isolines->setEnabled(false);
Expand Down
2 changes: 1 addition & 1 deletion projects/geometric-flow/src/mean-curvature-flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MeanCurvatureFlow::MeanCurvatureFlow(ManifoldSurfaceMesh* inputMesh, VertexPosit
SparseMatrix<double> MeanCurvatureFlow::buildFlowOperator(const SparseMatrix<double>& M, double h) const {

// TODO
return identityMatrix<double>(mesh->nVertices()); // placeholder
return identityMatrix<double>(1); // placeholder
}

/*
Expand Down
4 changes: 2 additions & 2 deletions projects/geometric-flow/src/modified-mean-curvature-flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ModifiedMeanCurvatureFlow::ModifiedMeanCurvatureFlow(ManifoldSurfaceMesh* inputM
geometry = inputGeo;

// TODO: build the Laplace matrix
this->A = identityMatrix<double>(mesh->nVertices()); // placeholder
this->A = identityMatrix<double>(1); // placeholder
}

/*
Expand All @@ -22,5 +22,5 @@ ModifiedMeanCurvatureFlow::ModifiedMeanCurvatureFlow(ManifoldSurfaceMesh* inputM
*/
SparseMatrix<double> ModifiedMeanCurvatureFlow::buildFlowOperator(const SparseMatrix<double>& M, double h) const {
// TODO
return identityMatrix<double>(mesh->nVertices()); // placeholder
return identityMatrix<double>(1); // placeholder
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SpectralConformalParameterization::SpectralConformalParameterization(ManifoldSur
SparseMatrix<std::complex<double>> SpectralConformalParameterization::buildConformalEnergy() const {

// TODO
return identityMatrix<std::complex<double>>(mesh->nVertices()); // placeholder
return identityMatrix<std::complex<double>>(1); // placeholder
}


Expand Down

0 comments on commit 4a7cf1d

Please sign in to comment.