GithubHelp home page GithubHelp logo

hw1-3dvision's Introduction

3D Mesh Processing Toolkit

This toolkit provides an implementation of two advanced 3D mesh processing techniques: Loop Subdivision and Quadric Error Metrics (QEM) Simplification. It is designed to help with the refinement and simplification of 3D mesh models, making it an essential tool for graphics programmers, modelers, and enthusiasts interested in 3D modeling.

Features

  • Loop Subdivision: Refines meshes by subdividing triangles into smaller triangles, increasing the mesh's detail and smoothness.
  • QEM Simplification: Reduces the complexity of a mesh by decreasing the number of vertices, while preserving the model's overall shape and features.

Project Structure

  • a1.py: The main script that processes a mesh with options for loop subdivision and simplification.
  • loop_subdivision.py: Contains the implementation of the Loop Subdivision algorithm.
  • mesh.py: Defines the mesh structure used for QEM Simplification.
  • assets/: Contains generated 3D objects and sample meshes for processing.

Installation

To use this toolkit, you need Python installed on your machine. Clone this repository to your local machine, and you're ready to process meshes.

git clone https://your-repository-url.git
cd your-project-directory

Usage

The toolkit is executed through the command line with various options for processing the meshes. Below is the basic syntax:

python a1.py [file_path] [options]

Command line arguments

  • file_path: Path to the mesh file you wish to process. If not provided, defaults to generating a cube.
  • iterations: Number of loop subdivision iterations to apply. Default is 3.
  • vertices: Desired number of vertices after simplification. Default is 4.

Examples

To process a mesh with default settings (generate a cube and apply 3 iterations of loop subdivision):

python a1.py

To process a mesh file with 5 iterations of loop subdivision:

python a1.py path/to/your/mesh.obj --iterations 5

To simplify a mesh to a desired number of vertices:

python a1.py path/to/your/mesh.obj --vertices 100

hw1-3dvision's People

Contributors

vishesh-mittal 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.