• Stars
    star
    121
  • Rank 283,513 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code repository for 15-869 Discrete Differential Geometry at CMU in Spring 2016.

DDGSpring2016

Welcome to the code repository for 15-869 Discrete Differential Geometry at CMU in Spring 2016.

##Getting started (OSX and Linux)

  1. Make sure you have an installation of Python 2.7, including the pip package manager.
  • Mac On recent OSX versions, Python is installed by default, and you may already have pip as well. Executing sudo easy_install pip in a terminal should install pip if not. Note that you may have to run python2.7 from the command line, as just plain python may run a different version.
  • Linux Get Python and pip from your package manager, if you don't already have them. On Ubuntu, try sudo apt-get install python-pip. To satisfy some other requirements below as well, try sudo apt-get install python-numpy python-scipy python-matplotlib.
  1. Install dependencies using pip. Execute these commands at the terminal (you may need to preface them with sudo).
  • pip install numpy (Numerical computing library)
  • pip install scipy (more scientific/numerical computing things)
  • pip install matplotlib (Plotting utilities)
  • pip install euclid (concise 3D vector rotations)
  • pip install plyfile (read & write the .ply file format) Note: On recent OSX machines, this may fail because System Integrity Protection makes it hard to upgrade numpy. In that case, try pip install --ignore-installed plyfile.
  • pip install pyopengl (bindings for 3D graphics & windowing)
  1. Download the code in this repository. Either use the Download Zip button on the repository page, or (if you are familiar with git) clone the repository.

  2. To verify the code works, open a terminal in the Assignment0 directory, and execute python testview.py ../meshes/bunny.obj (on some systems, you may have to use python2.7 rather than just python). You should get a window with bunny in it! Try clicking and dragging around in the window. For now the bunny will just look like a silhouette, after completing a future assignment it will look much nicer.

##Getting started (Windows) Unfortunately, like most programming tasks, this will be a little trickier in Windows.

  1. Anaconda is Python distribution which automatically includes many useful components for scientific computing (and also sets things up quite nicely on Windows). Download and install the Python 2.7 version of Anaconda from https://www.continuum.io/downloads (keeping the default configuation options).

  2. We use a few additional packages beyond those included with Anaconda, get the first two by running the following commands in a command prompt

  • pip install euclid (concise 3D vector rotations)
  • pip install plyfile (read & write the .ply file format)
  1. The third package we need is called pyopengl, which contains bindings for 3D graphics and windowing. Unfortunately, there is an error involving the 64-bit version of pyopengl in the pip repository. If you are running 32-bit Windows (unlikely), you can just execute pip install pyopengl as above.

If you are running 64-bit Windows (most likely), you will need to download a proper version of the package here http://www.lfd.uci.edu/~gohlke/pythonlibs/, you want the file called PyOpenGL-3.1.1b1-cp27-none-win_amd64.whl. Then navigate to the file in the command prompt and execute pip install PyOpenGL-3.1.1b1-cp27-none-win_amd64.whl. This will install the package directly with the fixed version you just downloaded.

  1. Download the code in this repository. Either use the Download Zip button on the repository page, or (if you are familiar with git) clone the repository.

  2. To verify the code works, open a command prompt in the Assignment0 directory, and execute python testview.py ..\meshes\bunny.obj. You should get a window with bunny in it! Try clicking and dragging around in the window. For now the bunny will just look like a silhouette, after completing a future assignment it will look much nicer.

##About Python

Clearly, the code for this class is written in Python. Pure Python code is typically an order of magnitude slower than the equivalent C/C++ code, but nonetheless it sees widespread use for numerical/scientific computing within some communities. We will be using Python for this course primarily because it very accessible to someone unfamiliar with the language, because sharing Python code across different platforms is relatively painless, and because it is free/open-source.

If you are unfamiliar with Python, don't be afraid! We will be doing everything possible to make this a painless experience. You might want to devote some time to basic tutorials on Python, but hopefully that will not be necessary. In this class you won't necessarily be creating complex programs from scratch -- just implementing algorithms.

The wiki for this repository contains (or will contain) some notes about Python as well as a series of examples demonstrating the usage of the language and this library.

##Codebase Outline

/DDGSpring2016
    /core
        /HalfEdgeMesh.py -- the main mesh datastructure
        /TriSoupMesh.py  -- an alternate mesh datastructure, used for input and output
        /InputOutput.py  -- read meshes from file
        /Utilities.py    -- miscellaneous helper functions
        /MeshDisplay.py  -- create viewers to visualize meshes in 3D
        /Camera.py       -- additional logic for MeshDisplay.py
        /shaders         -- used for visualization
          ...
    /Assignment1
        ...
        The files for the first assignment
    /Assignment2
        ...
        The files for the second assignment (etc)
    /meshes
        ...
        A collection of sample meshes to run your code on

During the course, we will be adding new /Assignment directories, as well as adding new functionality to the core libraries as it is needed.

You may notice some methods in HalfEdgeMesh.py that are only skeletons, the body of the method is not implemented. You will be implementing these methods as homework assignments. After each assignment is submitted, I will update this repository with reference implementations for these methods, so that you may use them on the subsequent assignments.

More Repositories

1

polyscope

A C++ & Python viewer for 3D data like meshes and point clouds
C++
1,616
star
2

geometry-central

Applied 3D geometry in C++, with a focus on surface meshes.
C++
985
star
3

potpourri3d

An invigorating blend of 3D geometry tools in Python.
Python
388
star
4

diffusion-net

Pytorch implementation of DiffusionNet for fast and robust learning on 3D surfaces like meshes or point clouds.
Python
369
star
5

happly

A C++ header-only parser for the PLY file format. Parse .ply happily!
C++
278
star
6

robust-laplacians-py

Build high-quality Laplace matrices on meshes and point clouds in Python. Implements [Sharp & Crane SGP 2020].
C++
178
star
7

neural-implicit-queries

Queries on neural implicit surfaces via range analysis: ray casting, intersection, closest point, & more. SIGGRAPH 2022 paper. JAX implementation.
Python
169
star
8

neural-physics-subspaces

Fit low-dimensional subspaces to physical systems with neural networks (SIGGRAPH 2023)
Python
134
star
9

intrinsic-triangulations-tutorial

An introductory course intrinsic triangulations for powerful & robust geometry processing --- tutorial code and links.
Python
119
star
10

nonmanifold-laplacian

A robust Laplace matrix for general (possibly nonmanifold) triangle meshes, and point clouds [Sharp & Crane SGP 2020]
C++
113
star
11

learned-triangulation

Source code for "PointTriNet: Learned Triangulation of 3D Point Sets", by Nicholas Sharp and Maks Ovsjanikov at ECCV 2020
Python
98
star
12

variational-surface-cutting

Codebase for "Variational Surface Cutting" by Sharp & Crane, SIGGRAPH 2018
C++
87
star
13

flip-geodesics-demo

Construct geodesic paths, loops, networks on surface with a fast and simple edge flipping algorithm. C++ demo app and more.
C++
80
star
14

vector-heat-demo

C++ demo of the Vector Heat Method (Sharp, Soliman, and Crane. 2019.)
C++
58
star
15

navigating-intrinsic-triangulations-demo

Demo code for "Navigating Intrinsic Triangulations". Sharp, Soliman, and Crane. 2019
C++
46
star
16

gc-polyscope-project-template

A template project to get started with geometry-central and Polyscope.
C++
43
star
17

polyscope-py

Python bindings for Polyscope
Python
29
star
18

arrgh

A small python utility to pretty-print a table summarizing arrays & scalars from numpy, pytorch, etc.
Python
24
star
19

discretization-robust-correspondence-benchmark

Benchmark for the generalization of 3D machine learning models across different remeshing/samplings of a surface.
Python
11
star
20

geometry-central-tutorials

Tutorials for the geometry-central geometry processing library.
C++
9
star
21

libigl-polyscope-project-template

An example project and build system using libIGL and Polyscope
CMake
7
star
22

RNA-Surface-Segmentation-Dataset

A dataset of segmented RNA molecule surfaces, as a benchmark task in 3D machine learning on surfaces. From Poulenard et al., 3DV 2019.
7
star
23

polyscope-docs

Documentation for polyscope
HTML
3
star
24

nmwsharp.github.io

HTML
1
star