|
|
Thorsten Froehlich wrote:
> In article <pan### [at] gmxch> , Christian Walther
> <cwa### [at] gmxch> wrote:
>
>> i.e. because right and up are so long, |right.up| > epsilon. Maybe the
>> vectors should be normalized before taking their dot product, or
>> something like this.
>
> Which would introduce other precision problems :-( Probably scaling
> EPSILON up rather than the vectors down would help.
Right, the numerical error would probably be smaller if one calculated the
dot product first and then scaled it down (or epsilon up) by the product
of the vector lenghts. But as far as I see in the source, the dot product
calculation at that place is only used to decide whether to show the
warning, so numerical accurracy shouldn't be a big concern. But the
present code is flawed because the bounds for the angle (within which it
is accepted as "perpendicular") depend on the lenghts of the vectors.
> Any any case, the warning as displayed is valid because they vectors are
> really not perpendicular.
Sure, but they are very close to perpendicularity. Sufficiently close not
to require a warning, IMHO. And as you can see, it confuses people. Maybe
it would help if the warning would include some numbers, so that one could
camera definition), or if it's just numerical error. Additionally, if
there is an error in the camera definition, one would probably find it
faster if one knew the angles.
-Christian
Post a reply to this message
|
|