[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does better polynomial calculations for avoid objects. (issue 486004
Re: Does better polynomial calculations for avoid objects. (issue 4860042)
Tue, 23 Aug 2011 04:55:58 +0000
File lily/bezier.cc (right):
lily/bezier.cc:239: return p.minmax (sol[LEFT], sol[RIGHT], d !=
On 2011/08/19 07:03:50, MikeSol wrote:
On 2011/08/18 21:36:45, joeneeman wrote:
> If there are multiple intersections with (say) r, then
> seem to return them in any useful order. So sol[RIGHT] is really
> arbitrary solution, isn't it?
True, but this seems no worse than line 81 where ts is returned.
this is a good excuse...
Right, but what really bothers me is that you're then using
sol[RIGHT] as though it means something. So what this function seems
to do (suppose ax=X_AXIS) is to take an arbitrary point where the curve
intersects x=r and an arbitrary point where the curve intersects x=l and
then finds the maximum y value of the curve between those two points.
But there's no guarantee that that maximum is what you're after. For
example, if the curve intersects x=r before it intersects x=l then it
seems to me that Polynomial::minmax will return something weird. And if
there are multiple intersections with either line, there are a lot of
different answers that could come out.