[sugar] Mathematical Diversions 2

Benjamin M. Schwartz bmschwar
Tue Oct 7 11:55:00 EDT 2008

Hash: SHA1

Tomeu Vizoso wrote:
| On Sun, Oct 5, 2008 at 3:51 AM, Benjamin M. Schwartz
| <bmschwar at fas.harvard.edu> wrote:
|> I have written up an algorithm for quasi-optimal placement of items in the
|> Mesh View.
|> I am not sure whether this algorithm is of use for Sugar.
| To determine so, I'd make some questions:
| - how it compares with the existing implementation functionality-wise?

New features:
- - Allows each icon to specify a preferred location, and attempts to place
each icon as near as possible to its preferred location (for consistent
locations between laptops and over time).

- - (optionally) Dynamically shrinks icons when there is no other way to
prevent overlap*

- - (therefore) Always finds a non-overlapping arrangement*

Lost features:
- - There are valid arrangements that this algorithm cannot produce.  For a
dense mesh view, its appearance may be somewhat different from the current
algorithms.  There are a number of tunable parameters and design choices
that affect the appearance, but no tuning has been done.

- - All icons are treated as circles, though it might be possible to have
circles coexist with rectangles and even ellipses in the future.

| - and performance-wise?
Computing the positions and shrinkage for 50 shared activity rings, all
large and overlapping, takes less than a second on my Thinkpad.  It would
probably take several seconds on an XO, but 50 shared activities is a very
large number.  I have made no attempt to increase speed, so some
improvements may be possible.  We can run this algorithm after the screen
has been preliminarily updated to reflect a change, so that the
computation time does not introduce any latency.

| - which dependencies eliminates or brings? how heavy are them?

It depends on the CVXOPT package, which weighs a bit over 2 MB.  That's
much bigger than I expected, and now I'm curious why it's so large.

- --Ben

*: These features are in new code, not yet posted.
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Sugar-devel mailing list