Closed afrancois closed 2 years ago
Thanks for this, and especially a repro case. I think this may actually be due to float
vs double
precision - can you verify that efe951e9fd02937cbdf4be8e1f73ae36bd3357de addresses your case?
@andrewfb Your solution in https://github.com/cinder/Cinder/commit/efe951e9fd02937cbdf4be8e1f73ae36bd3357de moves the problem out father but a sufficiently large circle is still going to exhibit the issue. At the end of the day, I think the that last point of the outside circle and the first point of the outside of the circle need to be the same.
The current implementation does make the first and last outside points the same, i.e. t=0.0
and t=1.0
are the first and last points, but it's using accumulation to get to 1.0 for the dubious benefit of eliminating a couple of inner-loop multiplies. Take a look at fbbe5aacc96b6c952f3d80b156db72dd5fde610d which I think should address it however. The problem with forcing the last point to match the t=0
point is that it pushes all the floating point accumulation error to the last triangle, resulting in a larger triangle than all the others.
Closing in favor of #2288
If rendering a large solid circle with geom::circle, the circle doesn't go all the way around. This makes it so that the last point outside the circle is at the same location as the first outer point, thus ensuring the circle is complete.
The following class will test the circle.