Hello,

I have recently been testing libcsironn (the version from plplot).
I have come across 2 errors :

1) in trunk/lib/nn/delaunay.c : delaunay_circles_find()

line  679 :            if (tid < 0 || tid == nn) {

should be changed to

line  679 :            if (tid < 0 || i == nn) {


This bug leads to "random" results, ie: the result of the interpolation
depended on the search just before.


2) in trunk/lib/nn/nncommon.c : circle_contains()

line 90 : return hypot(c->x - p->x, c->y - p->y) <= c->r;

should be changed to

line 90 : return hypot(c->x - p->x, c->y - p->y) < c->r + 0.000001;


This is just a standard floating point equality checking bug. It surfaces
when asking to interpolate on one of the given x,y coordinates. It gives the
result of delaunay_xytoi returning a certain triangle for the point, but
then the circle_contains() function says this point is no part of the
circumcircle.


I don't know if there is any "upstream" version of this library left that
maintains this code ?



Kind regards,

Pieter-Jan Busschaert
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to