W3C home > Mailing lists > Public > www-svg@w3.org > February 2014

Re: [SVG 2] bearing path command and simple drawing of objects with discrete rotation symmetry

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 14 Feb 2014 08:47:27 +1100
Message-ID: <52FD3D6F.10102@mcc.id.au>
To: David Dailey <ddailey@zoominternet.net>
CC: "'Dr. Olaf Hoffmann'" <Dr.O.Hoffmann@gmx.de>, www-svg@w3.org
David Dailey wrote:
> I think it's a pretty neat idea to allow bearing settings amidst path
> syntax. It makes it more like the good old turtle graphics from Logo
> that so many now middle aged youngsters once used.

Yes in meetings I've been calling it the turtle graphics feature. :)

Something I didn't mention in the spec, which is meant to be 
complementary to the bearing commands, is a way to easily write "draw an 
arc forward from the current point with a given radius, to the left or 
right".  That then is what would make drawing pie chart segments simple.

> I know that the WG had previously rejected some ideas of having
> angular settings together with repetitional boundaries so that, for
> example one could draw something like
>
> " M 100 100 R8 (b 45 h 20 ) " to draw an eight pointed star, by
> repeating the stuff inside the boundaries to be repeated eight
> times.
>
> The reaction at the time was that it would introduce microsyntax into
> path; yeah, but it would allow for really expressive code, and even
> things like fractals, without cluttering the DOM, the way<replicate>
> might (without fancy footwork in the realm of supershadowDOM), and
> given that resistance against angular constructs has worn down, maybe
> folks are ready for the next step?

There is something about repetition in path data that makes me more at 
ease than in element syntax for arbitrary elements.  I think there's 
less chance of writing something that basically hangs the browser.  That 
possibility still is there, if somebody writes "R10000" (well, it would 
be something other than "R" since that's going to be Catmull-Rom curve), 
which I'd still have a slight concern about.

Another issue is that it complicates the SVG DOM representation of the 
path segments (does the SVGPathSegList "expand" out the repetitions? or 
is there an object that represents the repetition, with child objects 
for the segments within the parens?), but that's not an insurmountable 
issue.  Also might be moot depending on how far we get in reforming the 
SVG DOM.
Received on Thursday, 13 February 2014 21:48:02 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:35 UTC