Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to delaunayquad from the given triangulation? #1

Open
TangLaoya opened this issue Mar 3, 2022 · 3 comments
Open

Is it possible to delaunayquad from the given triangulation? #1

TangLaoya opened this issue Mar 3, 2022 · 3 comments

Comments

@TangLaoya
Copy link

Dear Prof. Ahdhn,
Thank you very much for providing so powerful 'DelaunayQuad', from your result it is quick and generated high quality quads. However, I noticed that you colored vertices along with the triangulation, could you please separate these steps, i.e., could you please give me an example to generate quad mesh from a given triangulation?

Thanks,
Tang Laoya

@Ahdhn
Copy link
Owner

Ahdhn commented Mar 5, 2022

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!

@TangLaoya
Copy link
Author

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

@Ahdhn
Copy link
Owner

Ahdhn commented Mar 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants