Thursday, November 09, 2006

Ray Intersection with A Torus: Root Finder

Okay, so a torus expands into an incredible quartic (polynomial of degree 4) equation to solve for t. So in other words you need a root solver. Now there are many times, there are some iterative approaches and then there are formulas for quadrics, cubics, quartics. So here is the java source for root finders of quadrics, cubics, quartis:

Source RootFinder.java

This code is distributed under the GNU GPL

This page is powered by Blogger. Isn't yours?