GithubHelp home page GithubHelp logo

peterzs / digital_geometry_processing_projects Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 80.28 MB

License: GNU General Public License v3.0

C++ 86.99% Makefile 0.45% C 9.75% GLSL 0.38% Emacs Lisp 0.01% Awk 0.11% HTML 0.57% MATLAB 0.03% TeX 1.64% Shell 0.07%

digital_geometry_processing_projects's Introduction

CPSC 524, Digital geometry processing projects

Surface subdivision

The code implements butterfly subdivision, sqrt(3)-subdivision, and finally Loop subdivision.

Mesh simplification

The code in this folder implements two mesh simplification algorithms. Vertex decimation and Garland's edge collapse via quadratic error metrics.

Below is an example of the Chinese dragon mesh taken from the aim@shape repository. The original image shown below has roughly 600,000 vertices.

Using the edge collapse algorithm this mesh is simplified to 8855 and 1715 vertices, respectively, and shown in the figures below.

Using the vertex decimation algorithm this mesh is simplified to 8855 and 3829 vertices, respectively, and shown in the figures below. The vertex decimation implementation could not go beyond 3829. It is quite evident that the vertex decimation algorithm produces a less desirable result compared to that of edge collapse.

As-rigid-as-possible mesh deformation

The project includes an application for interactive deformation of meshes using the ARAP method.

Surface remesher

This folder implementes a surface remesher from the paper Explicit surface remeshing. As an example, the remeshed models of a hand and Max Planks bust are shown here. There is also a report and a presentation.

A Basic Ray Tracer Boosted with K-D Trees

make METHOD=opt -> optimized build
make METHOD=dbg -> debug build

./raytracer[.opt]

By default, this will render a scene with only a red cube and save the resulting image as output.bmp.

To run the executable and render a different scene, pass it as the first argument:

./bin/raytracer[.opt] your_scene_file_path

Here is an example (approximate run time 5 minutes).

./bin/raytracer.opt scenes/dragon.obj

Rendering scenes/dragon.ray
Output to scenes/dragon_out.bmp
got OBJ filename "meshes/Dragon.obj"
Mesh: 50000 triangles
Normals are already defined! But still doing flat shading.
got OBJ filename "meshes/teapot.obj"
Mesh: 6320 triangles
got OBJ filename "meshes/cow1.obj"
Mesh: 5804 triangles
got OBJ filename "meshes/icosahedron.obj"
Mesh: 20 triangles
Near: 1
Far: 20
Height: 0.535898
Width: 0.712745
Ray centered at: 1.2434 3.533 12 0
Corner1: 0.779874 3.52031 11.0081 0
Corner2: 1.48864 3.5221 10.933 0
Corner3: 1.50519 3.00608 11.0766 0
Corner4: 0.796417 3.00428 11.1518 0
Row 0 pixels done.
Row 100 pixels done.
Row 200 pixels done.
Row 300 pixels done.
Row 400 pixels done.
Row 500 pixels done.
Row 600 pixels done.
Row 700 pixels done.
Row 800 pixels done.
Row 900 pixels done.
Ray tracing terminated and images are saved.

digital_geometry_processing_projects's People

Contributors

h00shi avatar

Stargazers

 avatar  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.