Git Product home page Git Product logo

laplacianmesh's Introduction

laplacian-meshes

Please view this README rendered by GitHub at https://github.com/bmershon/laplacian-meshes

All images, words, and code contained in this repository may be reproduced so long as the original author is given credit (Chris Tralie and Brooks Mershon).

This assignment was completed as part of a course in 3D Digital Geometry (Math 290) taken at Duke University during Spring 2016. The course was taught by Chris Tralie.

LaplacianMesh.py is the file students are responsible for editing. The rendering engine and GUI is provided by Chris Tralie.

Introduction

This assignment revolves around the Laplace operator. Here, the operator is realized as a big ol' matrix which, when multiplied (on the left) by the matrix holding the mesh's vertices, gives us the curvature at each vertex. There are two flavors of the Laplacian matrix used here: umbrella weighting and cotangent weighting. The latter method of weighting attempts to correct for the uneven resolution of the mesh.

The following features have been implemented in this assignment:

  • Laplacian mesh editing (Umbrella and Cotangent weights
  • Color interpolation
  • Smoothing and sharpening
  • Minimal Surfaces
  • Flattening and surface parameterization
  • Texturing using UV coordinates

Laplacian Matrix

The Laplacian operator is encoded as a sparse matrix L, with anchor rows appended to encode the weights of the anchor vertices (which may be manually moved, hence the name Laplacian editing).

Cotangent Weights

Rather than using equal weights for each neighboring vertex in the Laplacian operator, we can attempt to correct for irregular mesh resolutions by using Cotangent Weights.

Homer's arms are raised by placing an anchor at a vertex on a finger tip that has been displaced vertically. A small handful of anchors placed symmetrically about his body help to restrict edits to his arms. Cotangent weighting is used here.

Smoothing (Umbrella Weighting)

We can smooth the teapot by iteratively pulling each vertex closer to the centroid of its neighbors. Iteratively smoothing the teapot will destroy small high-curvature features.

Sharpening (Umbrella Weighting)

We can sharpen the teapot by iteratively pulling each vertex farther away from the centroid of its neighbors. We notice that when we sharpen, we exacerbate the lower resolution modeling around the base of the teapot's spout. Self intersections can certainly occur by repeatedly sharpening the mesh.

The minimal surface preserves the topology of handle when six anchors are set in the teapot mesh.

A quadrilateral on the surface is chosen and its vertices are mapped to the unit square in the XY plane. The surface vertices are parameterized so that they lie inside of this unit square.

I'm a little teapot short and flat. There is my handle; Where is my spout?

Another example of flattening: Dragon gets squashed to the unit square.

Here, we apply a texture to a parameterization of the surface (UV Mapping). Unfortunately, by using the checkerboard texture, we see a lot of distortion that is not at all aesthetically pleasing. We observe this terrible distorition because the specified quadrilateral (green points) maps to a unit square, and all points "outside" of the mesh are squashed inside of this square. The mapping is certainly not conformal, and thus a straight-lined checkboard pattern is not going to produce an even checkboard patter across the entire mesh in most cases.

Homer and the teapot are textured with the checkerboard.

Keenan Crane's geometry processing framework based on discrete exterior calculus (DEC) presents a better solution for UV mapping textures to mesh models.

Bloopers (Art contest submission)

When you make a mistake in geometry processing, your mistakes can be beautiful.

Homer experiences an unfortunate bug in the smoothing algorithm.

laplacianmesh's People

Contributors

yantong1775 avatar

Watchers

 avatar

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.