W3C home > Mailing lists > Public > public-geometryapi@w3.org > July 2013

Re: things often done in geometrical applications

From: Doug Schepers <schepers@w3.org>
Date: Mon, 01 Jul 2013 01:25:58 -0400
Message-ID: <51D112E6.3040901@w3.org>
To: David Dailey <ddailey@zoominternet.net>
CC: public-geometryapi@w3.org
Hi, David-

On 6/28/13 4:06 PM, David Dailey wrote:
> Thanks for getting this going. Coincidentally, as it’s creation was
> being discussed, I in the midst of a project that could have used the
> fruits of this labor (assuming they might exist in a couple of years).

I've seen so many requests for something like this over the years that 
it was bound to overlap several people's projects that need it. :)

Thanks for this list to help us get started. I have a few comments on 
specific items, inline...

> Here’s just a quick list of things that come to mind that one might
> often wish to do
> Intersecting things, as per Kevin Lindsay’s work (wasn’t some of this
> already in SVG 1.2?):
>                  Lines, circles, ellipses, bezier (c and q) all with one
> another

I've added this to the use cases and requirements page [1]. Note that 
Kevin has pointed out some flaws and limitations in his library, and in 
using it, I've found that you have to know the segment/line type before 
performing an intersection test, which limits its usefulness.

This makes it a good candidate for addressing in a browser-native API, 
in my opinion.

> Points closest to one another  on various pairs of curves (simplest
> being two non parallel lines or a line and circle)
> Lines tangent to a given curve
>                  Closest to a point
>                  At a point
>                  Passing through a poin
> Lines tangent to each of two
>                  Circles (see
> http://jwilson.coe.uga.edu/emt669/Student.Folders/Kertscher.Jeff/Essay.3/Tangents.html
> )
>                  Ellipses

I could see some of this being useful in a drawing tool.

> Tweening – interpolating curves that are intermediate in shape between
> two given curves (see the code that comes with <replicate>

Kevin had a library (or script) for this as well, but I agree it could 
spawn some good requirements.

> Extrapolation – given curves A and B produce C so that B is 1/nth of the
> way from A to C.
> Given a set of n lines that divide the plane into (n^2 + n +2)/2 regions
> – convert those regions to convex polygons returning a collection of
> polygons
> Given a smooth path, convert it to a polygon having n edges for given
> n>2 most closely resembling the path.
> Given a polygon (convex or concave) or more generally,
>                  Form a triangulation of its interior
>                  Form a slight deformation of it (for glyphs we might
> consider arbitrary  svg <path>s rather than just polygons

You've lost me here. What sort of use cases would these address? Even 
just some illustrative examples would help.

>                  Produce a smoothed version (see
> http://srufaculty.sru.edu/david.dailey/svg/Draw018.html -- draw a
> rectangle, select it (by clicking on it) and then choose Smooth from the
> menu that appears)

Smoothing curves/shapes is really useful for drawing apps, especially 
those that have a distributed shared canvas, since it results in simpler 
paths to exchange.

> Given n points
>                  Find a polygon passing through them
>                  Produce a Voronoi diagram
> Produce random
>                  N-gon
>                  Smooth Bezier curves that pass through N control points
> and preserve continuous first derivatives
>                  Tessellations (polygonal, or rectangular – think HTML
> tables with colspan and rowspan)

These seem more like things you'd do in script, maybe using a geometry 
API for parts, rather than operations of a geometry API itself. But 
maybe I'm missing something.

> That such things are useful (hence implying the existence of use cases)
> seems obvious through a simple glance at the last 2500 years of progress
> in algebra, mensuration and geometry.

We'll have a much stronger case to bring to the browser implementers if 
we reinforce our requirements with explicit use cases. It will also help 
us focus on the highest-priority items.

> BTW, Inkscape has some of this stuff already, as does <replicate>,
> neither of which I saw in the script library listed in the wiki.

Like it says on the wiki, that page was a rough first draft, and anyone 
in the Community Group can edit it.

(That said, Inkscape isn't a script library... but all those links were 
just for inspiration anyway.)

[1] http://www.w3.org/community/geometryapi/wiki/Use_Cases_and_Requirements

Received on Monday, 1 July 2013 05:26:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:51:20 UTC