This bug (http://news.povray.org/3c23b26c@news.povray.org) is a simple
scaling problem.
In the file bezier.cpp there are three cross products (VCross) and
after each one you check the squared length of the resulting vector
against BEZIER_EPSILON (1.0e-10).
But the result of a cross product (a = b x c) is a vector (a) whose
length is the product of the length of the two vectors times the sine
of the angle.
||a|| = ||b|| ||c|| sin(b^c).
so scaling b and c, as the bug report author does, there is a value
of the scaling factor, below which a condition like
||a||^2 > BEZIER_EPSILON
is no more satisfied. It suffices to transform the three conditions
to:
||a||^2 > BEZIER_EPSILON * ||b||^2 * ||c||^2
and the image produced is quite independent from the scale factor.
HTH Massimo
Post a reply to this message
|