A collection of utility functions to prototype geometry processing research in python

Overview

gpytoolbox

This repo is a work in progress and contains general utility functions I have needed to code while trying to work on geometry process research in python. Most of them will be one-to-one correspondences with gptoolbox functions that I have used in my previous Matlab life and for which I have found no equivalence in existing libraries. Feel free to contribute by submitting a pull request!

Comments
  • Adding sample_mesh.py function

    Adding sample_mesh.py function

    Adding a function to sample a mesh. Future possible additions:

    • tet meshes (currently only polyline and triangle mesh)
    • blue noise (currently only uniform / white noise)

    We might want to consider deprecating random_points_on_polyline. For now, I have just updated that function to use sample_mesh.

    sample_mesh is also a nice example of how I think we should handle random number generation in the library in the future.

    opened by odedstein 2
  • Adding colormap functionality

    Adding colormap functionality

    Adding a function "colormap" that works like MATLAB's colormap, and then also "apply_colormap" to apply the colormap to a scalar function. I was not sure what exact interpolation behavior to choose for "apply_colormap", but MATLAB does piecewise constant, so I went with piecewise constant.

    opened by odedstein 1
  • Adding simple obj reader and writer

    Adding simple obj reader and writer

    So far for triangle meshes only.

    I have some confusion with the types that npe generates and the ones used in the Python library by convention. When should our functions return int32, and when should it be int64?

    opened by odedstein 1
  • Added new utility functions and updated doublearea formula

    Added new utility functions and updated doublearea formula

    Added the following utility functions:

    • halfedges
    • halfedge_lengths_squared
    • halfedge_lengths
    • edges
    • boundary_edges
    • boundary_loops

    Updated the doublearea function to use Kahan's formula.

    Added two new meshes as well as mesh credits to the unit test directory.

    opened by odedstein 1
  • fixing pip build error

    fixing pip build error

    It seems like the PyPi wheel for gpytoolbox in MacOs fails intermitently (it didn't use to fail, but pushing a trivial commit made it fail one hour after succeeding). It fails at installing numpy!

    opened by sgsellan 0
  • `signed_distance_polygon` returns nans if first polyline point is repeated

    `signed_distance_polygon` returns nans if first polyline point is repeated

    Sometimes, you'll see that a polyline is given with the last point being equal to the first to denote that it's closed. Currently, signed_distance_polygon does not support this and instead returns nan since it finds an edge with zero length. It'd be nice if the function just ignored zero-length edges instead of giving nans.

    enhancement 
    opened by sgsellan 0
  • png2poly rotates shape

    png2poly rotates shape

    Here's a png:

    octopus

    Running

    from gpytoolbox import png2poly
    poly = png2poly("octopus.png")[0]
    import matplotlib.pyplot as plt
    plt.plot(poly[:,0],poly[:,1])
    plt.show()
    

    for some reason produces a rotated polyline, as if the x and y coordinates were flipped:

    Screen Shot 2022-09-04 at 2 34 33 PM bug 
    opened by sgsellan 0
  • Better error messager for read/write mesh

    Better error messager for read/write mesh

    Instead of erroring with the C++ error code, the python code now interprets each C++ error code and provides an exception with a useful error message.

    opened by odedstein 0
  • Fixed dof solve

    Fixed dof solve

    Introduced function for solving a linear system with fixed degrees of freedom (the linear system is ignored on the fixed rows). This function attempts to behave similar to how gptoolbox's min_quad_with_fixed would behave on a non-symmetric matrix. In my opinion our min_quad_with_fixed is not the correct place for this functionality, since this is not a quadratic optimization problem with a symmetric matrix.

    This function is useful, for example, for finite difference Dirichlet boundary value problems.

    opened by odedstein 0
  • Bindings compilation times

    Bindings compilation times

    This separates all the bindings so that compilation can make use of parallelization. Also, changes some magic words in the numpyeigen calls so that it compiles faster.

    opened by sgsellan 0
  • Adding subdivision capability

    Adding subdivision capability

    This pull request adds a subdivide function that can be used to subdivide polylines and triangle meshes. Supports normal upsampling for polylines and triangle meshes, and loop subdivision for triangle meshes.

    Things to add to this in the future:

    • Spline subdivision for polylines
    • Upsampling for quad meshes
    • Catmull-Clark for quads and mixed quad/tri
    • Upsampling for tet meshes
    opened by odedstein 0
  • GMPlib certificate expiration

    GMPlib certificate expiration

    The SSL certificate in gmplib.org, from which libigl (and therefore us) downloads gmp, has expired, which causes curl (called to download gmp during our build) to fail. I merged #41 , a hotfix that changes our version of libigl to my PR branch sgsellan/libigl, but I am opening this issue so we have a reminder to revert this in the future when the libigl folks have converged on a solution.

    opened by sgsellan 0
  • remesh_botsch does not work for non-closed meshes

    remesh_botsch does not work for non-closed meshes

    I tried to remesh a non-closed/ watertight mesh with the remesh_botsch algorithm. Compared to a closed mesh (with almost the same size) it takes a lot longer (>100 times) and returns an error by exiting my python console.

    • Is your implementation not useable for non-closed meshes? The original paper has options for the boundary.
    enhancement 
    opened by EmJay276 11
Releases(v0.0.3)
Owner
Silvia Sellán
PhD student at University of Toronto Computer Science department.
Silvia Sellán
A Program that generates and checks Stripe keys 24x7.

A Program that generates and checks Stripe keys 24x7. This was made only for Educational Purposes, I'm not responsible for the damages cause by you

iNaveen 18 Dec 17, 2022
A meme error handler for python

Pwython OwO what's this? Pwython is project aiming to fill in one of the biggest problems with python, which is that it is slow lacks owoified text. N

SystematicError 23 Jan 15, 2022
Quickly edit your slack posts.

Lightning Edit Quickly edit your Slack posts. Heavily inspired by @KhushrajRathod's LightningDelete. Usage: Note: Before anything, be sure to head ove

14 Nov 19, 2021
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!

Ubelt is a small library of robust, tested, documented, and simple functions that extend the Python standard library. It has a flat API that all behav

Jon Crall 638 Dec 13, 2022
API for obtaining results from the Beery-Bukenica test of the visomotor integration development (VMI) 4th edition.

VMI API API for obtaining results from the Beery-Bukenica test of the visomotor integration development (VMI) 4th edition. Install docker-compose up -

Victor Vargas Sandoval 1 Oct 26, 2021
Python Yeelight YLKG07YL/YLKG08YL dimmer handler

With this class you can receive, decrypt and handle Yeelight YLKG07YL/YLKG08YL dimmer bluetooth notifications in your python code.

12 Dec 26, 2022
UUID version 7, which are time-sortable (following the Peabody RFC4122 draft)

uuid7 - time-sortable UUIDs This module implements the version 7 UUIDs, proposed by Peabody and Davis in https://www.ietf.org/id/draft-peabody-dispatc

Steve Simmons 22 Dec 20, 2022
Early version for manipulate Geo localization data trough API REST.

Backend para obtener los datos (beta) Descripción El servidor está diseñado para recibir y almacenar datos enviados en forma de JSON por una aplicació

Víctor Omar Vento Hernández 1 Nov 14, 2021
Find unused resource keys in properties files in a Salesforce Commerce Cloud project and get rid of them.

Find Unused Resource Keys Find unused resource keys in properties files in a Salesforce Commerce Cloud project and get rid of them. It looks through a

Noël 5 Jan 08, 2022
Color getter (including method to get random color or complementary color) made out of Python

python-color-getter Color getter (including method to get random color or complementary color) made out of Python Setup pip3 install git+https://githu

Jung Gyu Yoon 2 Sep 17, 2022
Create powerful passwords easily and with many options with this program

Password_Generator About the Program: You can create powerful passwords with this program with many options easily! Features: You can copy the generat

Sina.f 0 Jul 14, 2022
✨ Un pierre feuille ciseaux totalement fait en Python par moi, et en français.

Pierre Feuille Ciseaux ❗ Un pierre feuille ciseaux totalement fait en Python par moi. 🔮 Avec l'utilisation du module "random", j'ai pu faire un choix

MrGabin 3 Jun 06, 2021
A script to parse and display buy_tag and sell_reason for freqtrade backtesting trades

freqtrade-buyreasons A script to parse and display buy_tag and sell_reason for freqtrade backtesting trades Usage Copy the buy_reasons.py script into

Robert Davey 31 Jan 01, 2023
Greenery - tools for parsing and manipulating regular expressions

Greenery - tools for parsing and manipulating regular expressions

qntm 242 Dec 15, 2022
.bvh to .mcfunction file converter.

bvh-to-mcf .bvh file to .mcfunction converter

Hanmin Kim 28 Nov 21, 2022
Factoral Methods using two different method

Factoral-Methods-using-two-different-method Here, I am finding the factorial of a number by using two different method. The first method is by using f

Sachin Vinayak Dabhade 4 Sep 24, 2021
This repository contains scripts that help you validate QR codes.

Validation tools This repository contains scripts that help you validate QR codes. It's hacky, and a warning for Apple Silicon users: the dependencies

Ryan Barrett 8 Mar 01, 2022
A fast Python implementation of Ac Auto Mechine

A fast Python implementation of Ac Auto Mechine

Jin Zitian 1 Dec 07, 2021
Report Bobcat Status to Google Sheets

bobcat-status-reporter Report Bobcat Status to Google Sheets Why? I recently relocated my miner from my root into the attic. Bobcat recommends operati

Jasmit Tarang 3 Sep 22, 2021
Small Python script to parse endlessh's output and print some neat statistics

endlessh_parser endlessh_parser is a small Python script that parses endlessh's output and prints some neat statistics about it Usage Install all the

ManicRobot 1 Oct 18, 2021