Thanks Kelvin.

Can we expect any better implmentation for the polygon
triangulation problem in the next release? Just as my last post 
http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0211&L=java3d-interest&D=1&O=D&F=&S=&X=6631E23B2F5652D95B&[EMAIL PROTECTED]&P=38077
shows, Java3D usually generates some long-small triangles, which normally is
not an optimized meshing for the original polygons. I have a lot of models
demonstrating that.

Thanks. ---white

>As mention in previous mail it is because after
>v1.cross(v1, v2);
>v3.cross(v2, v3);
>
>one of v1 and v3 is close to zero in the 2 other cases
>so normalization fail and can't produce result 1 or -1.
>
>I would change this :
>
>   eps = v1.dot(v3);
>   System.out.println("eps = " + eps);
>     if (eps < 0 && (eps + TOL) < 0)    <===== reductant SAME as
>                                        (eps < -TOL)
>              return true;
>
>to
>  eps = v1.dot(v3);
>  System.out.println("eps = " + eps);
>   if ((eps > -1 - TOL) && (eps < -1 + TOL))
>           return true
>
>  if ((eps > 1 + TOL) || (eps < 1 - TOL)) {
>       System.out.println("This algorithm fail !!");
>       exit(1);
>   }
>
>
>Note that in the next v1.3.1 beta release
>4712222 - PickRay computation is not numerically stable
>
>is fixed by re-implement point in triangle test for PickResult
>and the core using Solution 3 of
>
>  http://astronomy.swin.edu.au/~pbourke/geometry/insidepoly
>
>which is more robust.
>
>So when beta release please check out the utility source code
>of PickResult.
>
>The good thing about utility that you can freely modify and
>suit your need such as handle this kind of corner case which
>Java3D may not handle quite well.
>
>- Kelvin
>----------------
>Java 3D Team
>Sun Microsystems Inc.
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to