inheritable geometry: a use case from declarative randomness

Frequently, over the past few years, I've found either myself or various
students (in a continent close to you), wondering why things like "fill" or
"font-size" should be inheritable, while things like "cx" and "d" are not.
It might make sense if SVG were like HTML and centered its purpose and
expressions around text, where things like size, shape and color are
tangential to the real purpose of the language: namely text (humankind's
monument to the triumph of agrarian bureaucracy, whence humans began using
grunts instead of gestures to communicate).

 

But with SVG (and any proper CSS of the future that will be medium-neutral),
geometry is the partner of text, rather than its dressing. Perhaps you have
heard my concerns along these lines in the past.  Alas, these concerns do
not seem to cure themselves.

 

Please contrast the 20 or so lines of declarative markup that construct
random snowflakes moving on random paths at 

http://cs.sru.edu/~ddailey/svg/randC3a.svg

and at

http://cs.sru.edu/~ddailey/svg/randC3b.svg 

 

The difference between the two is that, in the second, the snowflake's color
is inherited from the group (<g>), hence, the same for each of the six
replicated "leaves" of the snowflake. In the first, each leaf gets its own
random color.

 

Now, and unfortunately, each leaf also has its own geometry, since there is
no way to let the "d" attribute of the quasi-random path become inherited
from the group. It would be nice to reflect the initial geometry as it
replicated, since the visual cortex seems to be well-wired for perception of
symmetry (be it radial, reflective, or translational).

 

Similar shortcomings have been observed with CSS for SVG (even such obvious
things as rx and ry seem not to work) and with <use> (Fred Flintstone's
version of <replicate>, in case it has been forgotten by the youngsters).
The situations where one might like a <g> to have a series of elements that
share a shape but differ in color seem more likely that those in which we
wish to "cascade" color across a series of divergent shapes. Id est, it
looks like CSS has it exactly backwards for SVG.

 

BTW:

1.       The above examples only work in FF, Opera and ASV. 

2.       The new versions of Opera/Windows seem not to allow context menus
to appear when the SVG has been overloaded with SMIL - stopping it from the
Windows task manager seems to now be necessary.

3.       For another rather fun example (with a bit more going on) see
http://cs.sru.edu/~ddailey/svg/randC3.svg The clouds, the landscape, the
atmosphere, the snowflakes and their paths are all constructed using
<random> and <replicate> with no script and noteworthy conservation of
markup.  A similar example using code
(http://cs.sru.edu/~ddailey/kurukshetra/Kstars5.svg ) took about two days to
create. The current example reduced the development time by an order of
magnitude, giving me more time to write funny missives!

 

Received on Friday, 17 August 2012 18:54:54 UTC