Re: Method for finding intersection points

Hi, folks-

To facilitate this discussion, I've started a very rough draft wiki page 
on a geometry API [1].

I would welcome any comments about this, and especially help in filling 
out that wiki. Don't be afraid of making mistakes at this point, let's just

I deliberately didn't put it on the SVG WG wiki, so anyone with a W3C 
account could edit it.

In case there's enough interest in this, I've proposed a W3C Community 
Group [2]; if you are interested, please support the group. It will give 
us a dedicated wiki and mailing list to discuss the topic in depth.

[1] http://www.w3.org/wiki/Geometry_API
[2] http://www.w3.org/community/groups/proposed/#geometryapi

Regards-
-Doug

On 6/20/13 3:57 AM, Satoru Takagi wrote:
> Hi, All
>
>> I strongly agree.
> +1
>
> Such functions are primitive and important functions of the geosptial
> information systems (GIS). I expect such an evolution of SVG, though
> I do not hope that all of them are implemented immediately. It will
> facilitate that we can treat SVG content as data for GIS and web
> browser as GIS framework.
>
> Various topological operations;
> http://tsusiatsoftware.net/jts/jts-features.html Javascript
> implementations of them;
> http://lin-ear-th-inking.blogspot.jp/2011/05/jts-arrives-in-javascript.html
>
>  Regards,
>
> Satoru Takagi
>
>> Hi, Nikita-
>>
>> I strongly agree.
>>
>> In writing apps with SVG and JS, I've wanted to have an easy way to
>> get intersections for many different things. I'm currently using
>> Kevin Lindsey's intersection library on a personal project.
>>
>> I actually believe that we should work on a more comprehensive API
>> for point, vector, and matrix math (including intersections), which
>> could be used for both SVG and Canvas (and possibly CSS); JS libs
>> like Sylvester [1] and mjs [2] are a good start, but would have
>> better performance if implemented natively in browsers. I don't
>> have the math skills to do this myself, but if we could find
>> someone to help spec it out, I could facilitate the spec
>> production.
>>
>> [1] http://sylvester.jcoglan.com/ [2]
>> http://webgl-mjs.googlecode.com/hg/docs/files/mjs-js.html
>>
>> Regards- -Doug
>>
>> On 6/19/13 6:27 AM, Nikita Vasilyev wrote:
>>> I propose to implement a method for finding intersection points
>>> for basic shapes and paths.
>>>
>>> svgElements.getIntersectionPoints( svgElement ) -> Array of
>>> points, e.g. [{x: 1, y: 120}, …]
>>>
>>> There are JavaScript libraries for this
>>> http://www.kevlindev.com/geometry/2D/intersections/
>>> http://raphaeljs.com/reference.html#Raphael.pathIntersection
>>>
>>> There is a getIntersectionList method which calculates
>>> intersection using bounding boxes of the elements
>>> (http://dev.w3.org/SVG/profiles/1.1F2/publish/struct.html#__svg__SVGSVGElement__getIntersectionList)
>>>
>>>
It does NOT return intersection points.
>>>
>>> Motivation Finding intersection is commonly used for drawing and
>>> prototyping applications such as Adobe Illustrator to "snap"
>>> objects.
>>
>>
>>
>

Received on Thursday, 20 June 2013 18:10:50 UTC