incorrect self-intersections with cone and paraboloid shapes #44

Open
mmp opened this Issue Oct 25, 2015 · 1 comment

Projects

None yet

1 participant

@mmp
Owner
mmp commented Oct 25, 2015

The unit tests for incorrect re-intersections with spawned rays for Cone and Paraboloid fail (currently commented out in src/tests/shapes.cpp). This should be chased down; could be related to a bug in the EFloat class, since those lean heavily on that (vs the other shapes where the re-intersection tests all pass.)

@mmp mmp added a commit that referenced this issue Oct 29, 2015
@mmp Rewrite EFloat class to fix bugs.
We now maintain an explicit interval, conservatively rounded to bracket the accumulated error. This approach fixes the EFloat test failures that became evident in aad1f20.

This ended up being a bunch of changes, but eds up being more clear, I think, than fixing the error computaions in the earlier approach was turning out to be.

Improves self-intersection errors with some quadrics (issue #44). Those tests don't yet pass, but images with cones, and {hyper,para}boloids look much better now.
46de256
@mmp
Owner
mmp commented Apr 7, 2016

One issue is that the variant of Quadratic() for EFloats computes the discriminant using double precision, completely ignoring the inbound error bounds with the A, B, and C parameters. If instead this is implemented to use EFloats with double-precision values (and then the < 0 test is done with the interval's LowerBound(), results are... interesting.

The good news is that the incorrect self-intersections seem to be fixed; the tops of cones in particular look great. The bad news is that as they go farther from the origin, quadrics start to shrink--for example, for a unit sphere 10000 units from the origin (with the camera right next to it), what looks like the outer 15% or so of the sphere just disappears.

Further investigation is warranted...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment