Comments (3)
Thanks, @TangLaoya, for your interest!
The code runs 5 steps:
- Generate random set of points and color them red/blue randomly here
- Generate Delaunay triangulation from the point set (colors are ignored) here
- Switch colors to reduce the number of monochromatic edges here
- Construct quad mesh by removing monochromatic edges here
- 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.
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 2nnode, (x, y) coordinate of the vertices
/// tri: int array, size is 3ntri, index of vertices of triangles
/// nquad, output, number of quads
/// quad, output, int array, size is 4nquad, 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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delaunyquad.