Giter Club home page Giter Club logo

Comments (3)

Ahdhn avatar Ahdhn commented on August 15, 2024

Thanks, @TangLaoya, for your interest!

The code runs 5 steps:

  1. Generate random set of points and color them red/blue randomly here
  2. Generate Delaunay triangulation from the point set (colors are ignored) here
  3. Switch colors to reduce the number of monochromatic edges here
  4. Construct quad mesh by removing monochromatic edges here
  5. Post-process the quad mesh to improve its quality here

So, I think coloring the vertices is already separated from triangulation. If you already have a triangle mesh (must be Delaunay mesh from random pointset), all you need to do is to color the vertices of this triangle mesh randomly (and implement the heuristics in Step 3) and then you can go to Step 4 directly. Hope this answers your questions!

from delaunyquad.

TangLaoya avatar TangLaoya commented on August 15, 2024

Dear Prof. Ahdhn,
Thank you very much for your kindly reply. If I just color the vertices randomly, the step 3) will take very long time to execute. Since you said that in step 2) the colors are ignored, can I directly skip to step 2) after read the delaunay mesh?
Is it possible to provide an interface to 'delaunayquad' the given set of delaunay mesh? For example,

void DeaunayQuad(int nnode, double node, int ntri, int tri, int &nquad, int quad);
/// nnode: number of vertices of the delaunay mesh
/// ntri: number of triangles of the delaunay mesh
/// node: double array, size is 2
nnode, (x, y) coordinate of the vertices
/// tri: int array, size is 3
ntri, index of vertices of triangles
/// nquad, output, number of quads
/// quad, output, int array, size is 4
nquad, index of vertices of quad

Thanks,
Tang Laoya

PS: I also attached a delaunay mesh, could you please help me to take a look at it?
inputmesh.zip

from delaunyquad.

Ahdhn avatar Ahdhn commented on August 15, 2024

I am sorry but I don't have the time to spend on making changes to this code. The code is supposed to reproduce the results in the paper in which point set generation is a part of the algorithm.

I am not sure why step takes "very long time to execute". It is possible to integrate step 3 while assigning the colors randomly.

from delaunyquad.

Related Issues (1)

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.