eloraiby / delaunay Goto Github PK
View Code? Open in Web Editor NEWRelatively Robust Divide and Conquer 2D Delaunay Construction Algorithm in $O(n \log n)$
License: GNU Affero General Public License v3.0
Relatively Robust Divide and Conquer 2D Delaunay Construction Algorithm in $O(n \log n)$
License: GNU Affero General Public License v3.0
in the function :
static int del_init_tri( delaunay_t del, int start )
I think this function is use for creating a initial triangle .
here is the code which confused me :
/
d0->next = d5;
d0->prev = d5;
d1->next = d3;
d1->prev = d3;
d2->next = d4;
d2->prev = d4;
d3->next = d1;
d3->prev = d1;
d4->next = d2;
d4->prev = d2;
d5->next = d0;
d5->prev = d0;
*/
why halfedge d0 has same next and prev and why it is d5?
I think it should be:
d0->next = d1;
d0->prev = d2;
d1->next = d2;
d1->prev = d0;
d2->next = d0;
d2->prev = d1;
where I am wrong?
thanks!
It would be good to give this code a version. This will make it easier for me to version the Python package accordingly.
Hi,
Can you add a function which will check if a point is lying outside the delaunay structure?
This will be useful when using this structure for interpolation.
Also, I am checking for below test, Result is not correct:
const int n = 100;
float x1[n1],y1[n1];
float x[n],y[n],value[n];
float point[2_n];
for( int i = 0; i < n1; ++i ) {x1[ i ] = y1[ i ] = i;}
for( int i = 0; i < n; ++i ){
x[ i ] = x1[ i / 10 ];
y[ i ] = y1[ i % 10 ];
}
int j = 0, k= 0;
for(int i=0;i<2_n;i++){
if(i%2 == 0) { point[i] = x[j]; j++;}
else { point[i] = y[k]; k++;}
}
int np = sizeof point/(2*sizeof(float));
delaunay2d(point,np);
[I checked no edge formation between (4,9) and (5.9)]
I guess U are missing case when points lie OnCircle in "del_valid_link" function.
My point cloud input seams to be far from degenerated but triangulation fails with "1: floating point precision error" assert. Please find dataset attached.
delanuay-in.txt
Hellow, I need a help to solve a problem using Del.Triang. Can you help me to write a small programm on C++ (QtCreator). At the entrance I have massive an array of points (2D coordinates), that must be triangulated. And output array of elemets.
(Student of second grade of Saint-Petersburg Polytechnic University)
In advance thank you.
Hi,
Delaunay technique is for making triangles from given points. Example Image posted by you in Readme.md shows squares instead of triangles, which clearly hints OnCircle point case is not taken.
I'm getting
delaunay.c:690: del_valid_left: Assertion `v != u && "1: floating point precision error"' failed.
when using FAST_PREDICATE or EXACT_PREDICATE and
delaunay.c:754: del_valid_right: Assertion `du->pair' failed.
when using LOOSE_PREDICATE.
Code was built with gcc (Debian 4.9.2-10) and -m32
switch with any of -O1
, -O2
, -O3
.
Enabling SSE2 via -msse2 -mfpmath=sse
seems to solve the problem. The failing test is here
Hello, I am using your library for a project I am doing and I get an error at line 868 when I build the project.
The error's message is:
"Error 1 error C2440: '=' : cannot convert from 'void *' to 'del_point2d_t *' "
I fixed it by changing line 868 from:
res->points = malloc(sizeof(del_point2d_t) * num_points);
to:
res->points = (del_point2d_t*)malloc(sizeof(del_point2d_t) * num_points);
and it seemed to work.
It's weird how no one else had this error before, so I am not sure if I did something wrong or not.
I am using Visual Studio 2012 on Windows 8 64bit.
Regards, Alex
Hi! I'm not sure that it is the issue, but did you tried to implement yours Divide and Conquer delaunay algorithm in java? It'll be very helpful for me. Thanks!
Thank your code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.