W3C home > Mailing lists > Public > www-svg@w3.org > July 1999

Recursive structures and conditional rendering

From: <timeshigher1@pop3.mail.demon.net>
Date: Sun, 18 Jul 1999 17:49:02 +0100
Message-Id: <3.0.6.32.19990718174902.007a7d80@pop3.demon.co.uk>
To: www-svg@w3.org
Hi, I don't work at a graphics company but in a small corner of a large
media empire which has recently become very interested in the Internet. 

I believe SVG could break us out of the old HTML cliches and release a new
wave of creativity on the web, and I am pretty impressed with the draft
standard so far. Here's something I would like to throw into the pot.

CONDITIONAL RENDERING AND RECURSION

It would be extremely useful if SVG drawings could be recursive, so that a
drawing could contain transformed versions of itself. Among other things
this would provide a compact way of specifying fractals, infinite tilings
and non-planar topologies (such as the toroidal space familiar to Asteroids
players).

As far as I can tell from my very cursory reading, the draft standard does
not explicitly forbid recursion. What it lacks is any means for controlling
recursion and making it safe and efficient. 

One way to bring recursion explicitly into the standard would be to state
that a <use> element may reference the ID of the object that contains it. I
do not think this breaks the forward-reference rule, provided the ID is
stated at the beginning of the object declaration.
 
What else is needed? We would need a conditional construct to ensure that
at some point the recursion ceases and something different happens. (As
anyone who has played with fractals knows, it might only be when the
recursion terminates that anything is drawn at all.) Renderers should be
allowed to provide safety features such as a limit on recursion depth,
either as overrideable defaults or as absolute limits.

A conditional rendering construct would have many other uses. It could be
used to make additional text and symbols appear as one zooms in on a map or
diagram. 

I don't think this need is met by the SVG-DOM. The DOM lets you specify a
drawing's behaviour. What I have in mind is a declarative syntax which can
be used to specify parts of a drawing's structure.




Tony Durham
Digital Editor
The Times Higher Education Supplement
Admiral House, 66-68 East Smithfield
London E1 9XY
England
 
tel: +44 171 782 3256
mobile: 07957 870314
email: tdurham@timeshigher1.demon.co.uk
http://www.thesis.co.uk
Received on Sunday, 18 July 1999 12:50:12 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:17 GMT