I ported Polynomial.hs to Elm so I could use it for ray tracing a torus in a
browser game I was working on. I noticed several artefacts in the result and
traced it down to quartForm not returning any roots in a few cases.
This patch fixes this specific issue and a few other artefacts I saw. It did
not introduce any other glitches or artefacts into the ray tracer that I'm aware
of.
I ported Polynomial.hs to Elm so I could use it for ray tracing a torus in a browser game I was working on. I noticed several artefacts in the result and traced it down to
quartForm
not returning any roots in a few cases.The polynomial I used for debugging was:
Which has two roots according to Wolfram Alpha:
https://www.wolframalpha.com/input/?i=1+*+u%5E4+%2B+-240+*+u%5E3+%2B+25449+*+u%5E2+%2B+-1325880+*+u+++%2B+26471900.25
This patch fixes this specific issue and a few other artefacts I saw. It did not introduce any other glitches or artefacts into the ray tracer that I'm aware of.