|
|
Am 18.01.2013 22:10, schrieb Le_Forgeron:
> Le 18/01/2013 21:26, clipka nous fit lire :
>> Am 18.01.2013 20:48, schrieb clipka:
>>
>>> It appears to me that the quadric solver goes berserk on the second
>>> parabola whenever a ray is exactly parallel to the parabola's axis
>>
>> Turns out that this is not /precisely/ true. Actually the problem occurs
>> when the ray is /almost/ parallel to the parabola's axis (which happens
>> because when reflected earlier at the other parabola there are ever so
>> slight rounding errors). In such a case the algorithm gags on precision
>> issues.
>>
>
> would sturm help ?
> (quadric does not seem to be documented to like sturm, but a change of
> syntax for a poly ? hmm not sure)
Quadrics use their own specialized root solving code.
But the code can apparently be fixed by replacing a "(a != 0.0)" test
with "(fabs(a) >= EPSILON)".
Post a reply to this message
|
|