Section POV - sous section correction
| de loin | de près |
|---|---|
|
|
Un correctif temporaire est le suivant:
*** source/blob.c.old Fri May 11 18:57:23 2001
--- source/blob.c Fri Sep 7 20:16:47 2001
***************
*** 504,504 ****
}
}
/*
* If the following intersection lies close to the current intersection
* then first add/subtract next region before testing. [DB 7/94]
*/
if ((i + 1 < cnt) && (fabs(intervals[i].bound - intervals[i + 1].bound) < EPSILON))
{
continue;
--- 510,511 ----
}
}
+ #if 0
/*
* If the following intersection lies close to the current intersection
* then first add/subtract next region before testing. [DB 7/94]
*/
if ((i + 1 < cnt) && (fabs(intervals[i].bound - intervals[i + 1].bound) < EPSILON))
{
continue;
***************
*** 546,546 ****
{
continue;
}
!
/*
* Now we could do bezier clipping to find the roots
* but I have no idea how this works. [DB 2/95]
--- 553,553 ----
{
continue;
}
! #endif
/*
* Now we could do bezier clipping to find the roots
* but I have no idea how this works. [DB 2/95]
Il consiste à supprimer cette optimisation. Hélas, il vaudrait mieux réussir à corriger l'optimisation en la conservant, car les temps de calculs s'en ressentent et il devient souvent nécessaire d'ajout sturm dans le blob.
| sans sturm | avec sturm |
|---|---|
|
|
|
|
La correction est très simple (maintenant que l'on sait!):
--- source/blob.c.old Fri May 11 18:57:23 2001
+++ source/blob.c Wed Oct 30 19:10:18 2002
@@ -531,10 +530,10 @@
/* Calculate coefficients of corresponding bezier curve. [DB 10/94] */
dk[0] = newcoeffs[4];
dk[1] = newcoeffs[4] + 0.25 * newcoeffs[3];
- dk[2] = newcoeffs[4] + 0.50 * (newcoeffs[3] + newcoeffs[2] / 12.0);
- dk[3] = newcoeffs[4] + 0.50 * (0.375 * newcoeffs[3] + newcoeffs[2] + 0.125 * newcoeffs[1]);
+ dk[2] = newcoeffs[4] + 0.50 * (newcoeffs[3] + newcoeffs[2] / 3.0);
+ dk[3] = newcoeffs[4] + 0.50 * (1.5 * newcoeffs[3] + newcoeffs[2] + 0.5 * newcoeffs[1]);
dk[4] = newcoeffs[4] + newcoeffs[3] + newcoeffs[2] + newcoeffs[1] + newcoeffs[0];
/*
* Skip this interval if the ray doesn't intersect the convex hull of the
Section POV - sous section correction