[Drawkit] Now with added testing. (was Re: For the brave ; -)
Graham Cox
graham.cox at bigpond.com
Wed Jul 30 21:20:06 PDT 2008
Just FYI: I just did a quick comparison of the route finder versus a
simple sort of x and y versus manual placement. The grid is regular
but diagonally offset so that the visitation order for the simple sort
is clear (this does increase the path lengths slightly but the same
arrangement was used in all tests). I think it shows that a naive sort
is pretty useless for this.
If you know in advance that your objects are in a grid arrangement,
then you'd think you'd be able to come up with a visitation order that
is better than the route finder - but given a set of arbitrarily
placed objects, the problem becomes how to detect they are in a grid
in the first place. However, by manually placing the objects in a
specific order and doing no sorting at all, (bottom image) the path
length is *worse* than the route finder! So intuition isn't always
correct.
Straight sort of Y, then X: (path length 9896.748047)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 4.png
Type: image/png
Size: 150534 bytes
Desc: not available
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20080731/190108b9/attachment-0003.png>
-------------- next part --------------
DKRouteFinder: (path length 4810.483887)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 5.png
Type: image/png
Size: 134152 bytes
Desc: not available
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20080731/190108b9/attachment-0004.png>
-------------- next part --------------
Manually placed and unsorted: (path length 5210.396973)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 6.png
Type: image/png
Size: 125273 bytes
Desc: not available
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20080731/190108b9/attachment-0005.png>
-------------- next part --------------
More information about the Drawkit
mailing list