W3C home > Mailing lists > Public > public-html@w3.org > April 2007

non-rectangular images & <img> tag

From: Dailey, David P. <david.dailey@sru.edu>
Date: Mon, 23 Apr 2007 17:40:40 -0400
Message-ID: <1835D662B263BC4E864A7CFAB2FEEB3D258BD4@msfexch01.srunet.sruad.edu>
To: <public-html@w3.org>

I don't know much about this topic. So far as I know HTML may not need to worry about it until after 2010 -- maybe not then either.
 
Growing numbers of devices are being built that allow the display of spherical images (both large scale [1],[2] like panoramic projections that surround the viewer and smaller ones like globes). I gather that one generally uses a rectangular image format [3], together with some fancy stitching to eliminate the distortion involved in moving from cylindrical to spherical projection. Trying to do all that stitching in JavaScript would be a bit time-consuming one might suppose, particularly if we have access only to the six-parameter affine transformations available in <canvas> or <svg>.
 
So I guess the question is how well does <img> hold up when both the image and the display device are non-rectangular. It seems like the list of attributes might need to be adjusted a wee bit to handle such a case, or perhaps we'd need another tag of some sort like <pano> to handle it. A viewer of a spherical image (or even of a cylindrical one [4]) will generally want access to 2D pan controls on even a rectangular display, and such controls would generalize conveniently it seems to spherical displays (the plane and the sphere both have topological graph theoretic genus of one).
 
The situation gets worse though, and maybe the Math ML group has touched on this question a bit. Suppose the projection is toroidal, or worse yet, non-orientable like a mobius strip or klein bottle? Now, I rather suspect that most good members of the HTML community make some effort to avoid spending much of their time inside Klein bottles. They seem so much less real-worldly than, say, physics. But consider toroidal projections. The use case there is a bit clearer. In graph visualization, the class of graphs representable without crossing edges gets richer and richer as the surface on which we embed them gets more complex. A toroidal embedding works for seven mutually interconnected nodes while a planar embedding handles at most four. The number of published papers on the topic of toroidal embeddings has has approximately doubled every three years for the past thirty years or so that I've paid attention to such things, so that in no time at all, we may predict that the universe will be completely stuffed with such papers (is that not the reasoning that led to the dotcom bust?). At any rate, the good news is that folks have already built navigational controls for toroidal universes -- the game of asteroids is toroidal. 
 
So a single set of controls would allow us to handle planar as well as spherical and toroidal panning -- it's just that whatever file format we might declare is rendered useless without such controls, and I'm rather uncertain that spherical panning or even stitching can be handled with the <image> tag without some rather inspired wizardry.
 
cheers,
David Dailey
 
[1] http://www.jstage.jst.go.jp/article/elex/2/14/2_411/_article
 
[2] http://portal.acm.org/citation.cfm?id=974018&dl=acm&coll=&CFID=15151515&CFTOKEN=6184618
 
[3] http://local.wasp.uwa.edu.au/~pbourke/projection/2fish/
 
[4] http://srufaculty.sru.edu/david.dailey/javascript/slip.html
Received on Monday, 23 April 2007 21:57:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:53 GMT