Coder Social home page Coder Social logo

cg1's Introduction

cg1's People

Contributors

brussig-tud avatar felix-kaestner avatar philippmatthes avatar

Stargazers

 avatar

Watchers

 avatar

cg1's Issues

3.2.3 Connected Component Analysis

Implement function ExtractShells in file ShellExtraction.cpp. The function returns the num-
ber of connected components. Furthermore, is assigns a shell id to every face. The shell idea is an integer in the range [0, n), where n is the number of connected components. Use the following code to set the shell idfor a face f (represented as a face handle):
m.property(perFaceShellIndex, f) = shell id;

You can solve this task either with region growing or using a union-find data structure (available under
util/UnionFind.h). In contrast to the lecture, the region growing approach should operate on faces
instead of vertices.

Hint: You can check if a face has already been visited via its shell_id attribute. This attribute is initialized
to −1 for each face at the beginning of the function. (2 Points)
You can test your implementation by loading foot_bones.obj from the data folder. Clicking the
”Extract Shells” button, a message box should tell you that the model consists of 26 shells. Furthermore, the shells are colored according to their shell id.

3.2.4 Smoothing of Vertex Positions

In this task, you are going to implement iterative smoothing using the uniform Laplacian and explicit inte-
gration. The update rule for vertex positions is:

p new ← p old + λ∆p old

Implement the smoothing functionality in SmoothUniformLaplacian in file Smoothing.cpp. The
function takes λ and the number of iterations as parameters (you can set them via the GUI). Be aware that by applying the update rule to a vertex, you are changing the one-rings of its immediate neighbors (which might not have been updated yet). For testing purposes, you can load a model and add noise with the corresponding GUI button. If your implementation is correct, the button Laplacian Smoothing should allow you to de-noise the model.

3.2.5 Triangle Stripification

Implement the extraction of triangle strips using the greedy algorithm presented in the lecture in function
ExtractTriStrips in Stripification.cpp. The function returns – similar to ExtractShells
– the number of strips, and it should assign a strip id to each face. The function takes the number of trials as
parameter, which you can set via the GUI.
Make sure that a strip always starts with parity 0 to make the tessellation consistent with OpenGL rendering.

Hint: Take a look at the data structure sample_set in file sample_set.h. It allows to efficiently add,
remove, and randomly sample elements (using a uniform distribution).
The button Extract Triangle Strips starts the calculation for the loaded model. To test your im-
plementation, you can use a torus. Using a sufficiently large number of trials (e.g., 20), your implementation
should find 20 triangle strips of length 40. The torus should be colored in a regular pattern.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.