Coder Social home page Coder Social logo

polylla-mesh's Introduction

New simplest version using POO and halfedge data structure

There is a new version of this mesh generator to facilitate the integration with third party software.

https://github.com/ssalinasfe/Polylla-Mesh-DCEL

POLYLLA: Polygonal meshing algorithm based on terminal-edge regions

New algorithm to generate polygonal meshes of arbitrary shape, using any kind of triangulation as input, adaptable to any kind of geometry, no addition of extra points and with a data structure tp an easy implementation to all language programmings.

The algorithm needs a triangulation as input, this triangulation is represent using 3 files:

Example of use:

Calls to file with points:

./Polylla <node file> <ele file> <neigh file> <output filename>

The output is a <output filename>.off file, a <output filename>.svg file and a <output filename>.json file with the metrics of the mesh.

Input data generation

Following scripts to generate input files were made to test the algorithm using the Virtual Element Method

Random points files generation (.node)

  • 2x2RandomPoints.py: Generate random points inside a square 2x2

Random point PLSG (.poly)

  • R2DiskRandom.py: Generate a PLSG of a circle of radio 2 with random points inside of it
  • 2x2Lrandom.py: Generate a PLSG with L-shape with random points inside of it
  • 2x2QuaterCircle.py: Generate a PLSG in a square of 2x2 with a quartercircle of radio 0.4 in the left botton corner and random points inside of it

Semiuniform triangulations (.node and .ele)

  • R2DiskSemiuniform.py: Generate a semiuniform triangulation in a disk of radio 2
  • 2x2QuaterCircleUniform.py: Generate a semi Uniform triangulation inside a square of 2x2 with a quartercircle of radio 0.4 in the left botton corner.
  • Luniform: Generate a semi uniform triangulation with L-shape

Work in progress. TODO

  • Agregar que acepte cualquier input mientras que tengan un archivo .node. .ele, -neigh
  • Cambiar stream de archivo por stream de string en la funcion read_from_triangle
  • Verificar la estructura de datos del input para que haya una correcta asociación de los triangulos y la adjacencia
  • Aceptar como input .node and .ele y generar la adjacencia en base a eso.
  • Usar safe arrays en vez de array
  • Cambiar polygon array por list o vector
  • Eliminar funciones no usadas
  • Reescribir todo y encapsularlo en una clase para usarlo como librería
  • Llamar a triangle en vez de a detri2 cuadno solo se tenga de input un .node (detri no genera triangulaciones de más 10^6 puntos)
  • Generar como output un svg
  • Construir test

polylla-mesh's People

Contributors

ssalinasfe avatar

Stargazers

Gyksyj avatar  avatar Beltrán Amenábar 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.