re: knotting, knitting, weaving and traffic flow

Hello,


well due to my (german) tutorial about this issue there are different
ways to manage this. Whether it can be considered trivial or not depends on
the individual situation and on the patience of the author ;o)

a) clip, mask and maybe some other tricks may work.
For such a simple situation the simplest way is maybe to put the street
(as disjoined paths), the motion path (without disjoined segments)
and the car into a defs element and reference street and car with
some use elements.
Calculate the times for the critical bridge points.
Animate the XLink:href of the use elements with these times to 
switch what is rendered on top for the related times.
With this method I manage for example to simulate a 3D-rotation
of a star tetraeder (is this the name in english as well?) including
a spherical projection:
http://hoffmann.bplaced.net/svgueb/sterntetraeder2.php
(Well - if there are poblems with the animation, this only indicates
timing bugs in the used viewer or performance problems of the
CPU).
Other objects, same approach:
http://hoffmann.bplaced.net/svgueb/dodekaeder2.php
http://hoffmann.bplaced.net/svgueb/tetraeder2.php

For them the right order is simply done by PHP sorting using
the center of each surface to create the values lists for the
animation of the hrefs of the use elements.
For your street sample it should be even simpler like for this one:
http://hoffmann.bplaced.net/svgueb/umrunden1.php
(It is not just simpler, if uses another approach, because there
are viewers having problems with a massive animation of
XLink:href).

b) see a) use another path without gaps. There is no need
to create the graphical presentation of the street in the same
way than the motion path.

c.1) If there are  knot theoreticians interested in SVG, would be
interesting to hear from them how to solve such rendering order
problems in a simple way ;o)

c.2) I think, there is no general solution for SVG1.1, 
if you have a larger amount of objects, for example a model of 
the solar system. 
For such a problem one can manage to keep the motion along
the paths simple for each planet, however the intended timing of
the rendering order can be a complex problem, depending on
the complexity of the model (how many objects like dwarf planets
etc are in the model).
To solve such a problem in general, 
one needs something like an animatable z-index property with
values either large integers or floats.

Olaf

Received on Sunday, 24 October 2010 18:03:46 UTC