From: Maurice L. <mj...@ga...> - 2001-12-15 07:21:17
|
Rafael Laboissiere writes: > * Alan W. Irwin <ir...@be...> [2001-12-13 13:53]: > > > I believe the problem is actually pretty simple. Just from looking at the > > results, the current 3D shaded logic apparently makes a decision about > > which (relatively large) triangle is hidden and which not, and has no > > facility to refine the triangles shape and size so that they can smoothly > > follow the line marking the edge of hidden regions. We were up against a > > similar problem for the excluded regions of 2D shade plots, but (see the > > last page of x16c) Rafael found a working solution that involved a binary > > search (IIRC) to refine the triangles so they smoothly followed the edge of > > the excluded region. Although he has stated his code cannot be directly > > used in the 3D shading case, I am hoping his general idea can be used. If > > so, it should be a matter of a reasonably short effort to fix this with > > much thanks for whoever came up with the solution. > > >From my recollection, the algorithms have completely different > implementations, athough the problems addressed are quite similar. I am > afraid that the effort needed will be not that short, but who knows? When I looked into this last spring (fixing several bugs in the process), I concluded we might be better off with a new algorithm. The original algorithm only follows lines, not regions. If one endpoint of the line is hidden but the other is not, it merely calculates the intersection point and draws from that point. Extending this to 2D and getting it right does not look easy to me. The existing shade extension is clever but I found the boundary conditions too messy to be able to make solid headway without considerable effort. -- Maurice LeBrun mj...@ga... |