On Sat, Aug 18, 2012 at 5:34 AM, Keith OHara <k-ohara5...@oco.net> wrote:

> On Fri, 17 Aug 2012 10:16:25 -0700, <mts...@gmail.com> wrote:
>
>
>> http://codereview.appspot.com/**5626052/diff/106004/lily/axis-**
>> group-interface.cc#newcode780<http://codereview.appspot.com/5626052/diff/106004/lily/axis-group-interface.cc#newcode780>
>> lily/axis-group-interface.cc:**780: while (dirty);
>> On 2012/08/17 08:12:56, Keith wrote:
>>
>>> I am beginning to understand the new code. Would you consider again using
>>> distance() instead of the repeated calls to intersects() in the
>>> while(dirty)
>>> loop ?  It might look simpler now that you've been away from the code
>>> for awhile.
>>>
>>
>  floors[j] = padding - forest[j][UP]~distance~pair[**DOWN]
>>> ceilings[j] = forest[j][DOWN]~distance~pair[**UP]
>>>
>>
>  You know the solution will be to move an amount equal to one of the
>>> floors[j],
>>> and you want to find the smallest that fits, so make
>>>    trials = sort (floors)
>>> and find the smallest among trials that satisfies
>>>     trials[n] > 0
>>> &&  for all j (trials[n] > floors[j]
>>>                 || trials[n] < ceilings[j] )
>>>
>>
>  I am not adverse to using distance if possible - my trouble case is the
>> following.
>>
>> AAAAAAAAA
>>
>>      BBBBBBBBBBBBB
>>
>> Image that object A above is placed first and LilyPond is now
>> considering whether it should leave B where it is or place it above A.
>> The distance function would dictate that it needs to be shifted above A
>> because its DOWN skyline is below A's UP.
>>
>
> We need not let the distance function between A[UP] and B[DOWN] dictate,
> because having positive distance between A[DOWN] and B[UP] is another
> solution.
>

If you check out the dev/jneem-skylines (which is a simplified but not
(yet) feature-compatible version of Mike's branch), you'll see that I'm
using this method under the name 'bool Skyline_pair::intersects.'

Cheers,
Joe
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to