W3C home > Mailing lists > Public > public-svg-ig@w3.org > July to September 2008

FW: 2-D physics and web layout

From: Dailey, David P. <david.dailey@sru.edu>
Date: Thu, 4 Sep 2008 16:50:27 -0400
Message-ID: <1835D662B263BC4E864A7CFAB2FEEB3D01720CC6@msfexch01.srunet.sruad.edu>
To: <public-svg-ig@w3.org>
I realized today that I had somehow sent this to the wrong place...
(apologies for redundancy, but it was really meant to be inthis place
rather than the other (and I'm not really sure what
public-svg-ig-request is))


All the better since I found some things to add to it..... [I'll put
those in [square brackets]]


The updated version of this stuff is being maintained at

(with plans to move it to the wiki soon)


The talk of Yan Li and students at SVG Open concerning extensions to the
spec for mapping purposes also motivates a part of the reason for
providing so general a solution as that of the <map><superpath/></map>


I know that once my semester is in full swing I will have much less time
for this which is why there is an urgency to get the ideas out before
they are completely well formed. The link above should give a clearer
view, at least until it moves to the wiki.


Thanks for your patience



From: Dailey, David P. 
Sent: Wednesday, September 03, 2008 11:21 AM
To: 'public-svg-ig-request@w3.org'
Cc: 'Cameron McCormack'
Subject: 2-D physics and web layout


Cameron,  (and others)


I've delighted to hear you've taken on the page layout topic for SVG.
Inter-object constraints within such things as working diagrams are
quite interesting, and while just access to a <table> like object in SVG
(I really have my doubts that CSS is powerful enough to handle
non-regular partitions of a rectangle such as rowspan and colspan allow
for layout though I'm anxious to be proven wrong) will handle most of
people's needs, the geometric interdependencies sometimes become more
complex, I think.


The thing I was babbling on about at dinner, as we had a brief chance to
talk was this:



It's a very nifty little demo (3 minutes or less) of how PHUN (from a
Swedish University) works.


In my mind the relevance to SVG (or web content in general) is as


There is a sort of physics to layout. Containers have volume (as given
by their contents); containers have adjacency. Operations on the
resizing or repositioning of elements have implications on the pressure
and tensile properties of those contents.


For example if we have three polygons meeting at a point and each is
filled with a combination of text and graphics, the volume of that
content will affect the ways that the containers can be reshaped.  Thing
of the content as fluid, that is somewhat compressible. Text has limits
beyond which compression is not allowed. Graphics have rigidity which
affects how much deformation is allowed; while text tends to flow more
easily (in the general case)


If we generalize the table (as a way of carving rectangles into
rectangles) into the <map> (informally, a collection of <superpaths>
whose adjacency is determined by the borders they share) then the flow
dynamics of that system is a simplified 2-D physics, consisting of
elasticity, flexible chains, and rubber bands. I think the <map
type="map"><superpath fill="href to textual and graphic content"/>
<superpath fill="href to textual and graphic content"/><superpath
fill="href to textual and graphic content"/></map>  approach being
discussed at http://srufaculty.sru.edu/david.dailey/svg/Spec.html (and
on our wiki, presumably sometime) may lend itself conveniently to allow

a flexible geometry for the planar interrelationships of content, and a
fairly easy way to introduce a computationally lightweight physics to
allow for the resizing and positioning of contents so as to preserve
constraints on how different content may be displayed.


Some pictures can move in x-y but may not be rotated. Others can be
deformed but must maintain verticality. In some cases, like in morphing
from one scene to another, we wish local deformations to be negligible,
for edge/boundary constraints to be preserved, but other than that the
content (a bitmap or vector graphic) is quite fluid and stretchable and
can deform to fill whatever curve it is poured into (while minimizing


The notion of deforming a liquid graphic through a volume-preserving and
proximity-preserving deformation from any simple closed curve to any
other provides a rather flexible metaphor for the class of possible
nonrigid transforms. The advantage of such a metaphor, I think, is that
it is intrinsically declarative - the user specifies what the beginning
and end shapes look like - the computer figures out the rest. Hence it
is much in the spirit of SVG itself!


This may or may not be along the lines of what the WG has been
discussing; I must apologize for not being a better listener, since I
got so excited about putting a physics into this little graph theory
(one of my favorite topics) so it may be that the direction you are
going is even more general, or that it is considerably more practical,
but if <superpaths> can be used for animation, map/boundary encoding,
and graph theory, then squeezing page layout out of it would just be
icing on the cake!


I think as we scale diagrams down to smaller devices with differing
aspect ratios, the demands on scaling placed by our semantics, can at
least partially be represented by a simple physics.


Best regards



Received on Thursday, 4 September 2008 20:51:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:28:23 UTC