Login  Register

Re: contour lines disappeared when zoom in 3D earth coordinates

Posted by Martin on Dec 21, 2021; 12:13pm
URL: https://forum.jogamp.org/contour-lines-disappeared-when-zoom-in-3D-earth-coordinates-tp4041550p4041551.html

Hi,

One thing I had to deal with while implementing contour in Jzy3D was the coplanar lines/polygons problem. In this situation a line coplanar to a polygon may have its depth values a bit greater than the one of the polygon for some pixels, but a bit smaller for some other pixels.

If this makes sense, you may look at this class to see how I solved it. The code has links toward web pages explaining the problem and the solution. The Painter interface is my code is simply a wrapper around GL. Most of the time you can replace painter by gl. You may have to replace enums (such as StencilOp) by the actual GL constants having the same name.