On Tue, 11 Sep 2012 11:14:09 +0200 Birin Sanchez <[email protected]> wrote:
> Hi Pekka, Hi Birin! > I gave a try to v2 of cliptest and found something that might be > interesting. See attached screenshot. > > This is how to get those extra 4 vertex: > > * Move the clipping area to cover the surface with exactly the same > size, you'll see 4 vertex as expected > * Press 'n' or 'm' to get the surface to spin at least 4 times > * From the 4th spin onwards you'll see the extra 4 vertex. If you > make the surface to spin in the other direction the extra vertex will > disappear. > > I guess this is due to float rounding errors. Yes, but at least the vertices are not clearly duplicate. It is hard to set the limit on what fraction of a pixel is significant enough that we need to compute the intersection. There is a somewhat arbitrary limit hardcoded now, and the value is a trade-off between geometric correctness and number of vertices. When you spin the red box enough, the rounding errors accumulate, and the angle (the orientation is stored as a single angle in cliptest) is no longer approximately the multiple of 2pi. The red box is tilted enough for the algorithm to compute intersections instead of rounding back to a quadrilateral. At least I assume so. Therefore, I do not consider this a bug. Now that I think of it, I could probably do with a lot smaller rounding threshold than the 4e-5, since your extra vertices are a result of the intersection code working *right*. > Apart from this issue I couldn't find any other problems. Thank you very much for testing! - pq _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
