Hang on, if the quadratic equation is used on a finite line which doesn't completely go through the sphere (partial intersection)... how many roots will there be? I will calculate a test case by hand. Obviously the quadratic equation will product two roots, but a way of discerning the physically realistic roots would be useful.
- Also, what to do if the sphere really does go through a joint twice? Simple:
- The value returned by the quadratic equation is the parameter (is it normalised?). The value closest to unity will represent a point further along the curve segment.
Testing partial intersection by calculating roots between a finite line and a circle and graphing the results.
Conjecture: the root most suitable to represent the parameter t along the line will exist in the range [0, 1].