Re: [Numpy-discussion] Creating parallel curves

2012-02-13 Thread Chris Barker
On Mon, Feb 13, 2012 at 1:01 AM, Niki Spahiev wrote: > You can get polygon buffer from http://angusj.com/delphi/clipper.php and > make cython interface to it. This should be built into GEOS as well, and the shapely package provides a python wrapper already. -Chris > HTH > > Niki > > _

Re: [Numpy-discussion] Creating parallel curves

2012-02-13 Thread Niki Spahiev
You can get polygon buffer from http://angusj.com/delphi/clipper.php and make cython interface to it. HTH Niki ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Robert Kern
On Sun, Feb 12, 2012 at 20:26, Andrea Gavana wrote: > I know, my definition of "parallel" was probably not orthodox enough. > What I am looking for is to generate 2 curves that look "graphically > parallel enough" to the original one, and not "parallel" in the true > mathematical sense. There is

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Andrea Gavana
Jonathan, On 12 February 2012 21:59, Jonathan Hilmer wrote: > Andrea, > > I realized that my answer wouldn't be complete, but as people have > pointed out that's a substantially more difficult question, so I > wanted to give you a complete answer to just a subset of your problem. > > I'm currently

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Jonathan Hilmer
Andrea, I realized that my answer wouldn't be complete, but as people have pointed out that's a substantially more difficult question, so I wanted to give you a complete answer to just a subset of your problem. I'm currently writing a variant that avoids the overlapping normal vectors by interati

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Charles R Harris
On Sun, Feb 12, 2012 at 1:26 PM, Andrea Gavana wrote: > Charles, > > On 12 February 2012 21:00, Charles R Harris wrote: > > > > > > On Fri, Feb 10, 2012 at 9:38 AM, Andrea Gavana > > wrote: > >> > >> Hi All, > >> > >>my apologies for my deep ignorance about math stuff; I guess I > >> should b

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Charles R Harris
On Sun, Feb 12, 2012 at 1:21 PM, Andrea Gavana wrote: > Jonathan, > > On 12 February 2012 20:53, Jonathan Hilmer wrote: > > Andrea, > > > > Here is how to do it with splines. I would be more standard to return > > an array of normals, rather than two arrays of x and y components, but > > it actua

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Andrea Gavana
Charles, On 12 February 2012 21:00, Charles R Harris wrote: > > > On Fri, Feb 10, 2012 at 9:38 AM, Andrea Gavana > wrote: >> >> Hi All, >> >>    my apologies for my deep ignorance about math stuff; I guess I >> should be able to find this out but I keep getting impossible results. >> >> Basically

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Andrea Gavana
Jonathan, On 12 February 2012 20:53, Jonathan Hilmer wrote: > Andrea, > > Here is how to do it with splines.  I would be more standard to return > an array of normals, rather than two arrays of x and y components, but > it actually requires less housekeeping this way.  As an aside, I would > prefe

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Charles R Harris
On Fri, Feb 10, 2012 at 9:38 AM, Andrea Gavana wrote: > Hi All, > >my apologies for my deep ignorance about math stuff; I guess I > should be able to find this out but I keep getting impossible results. > > Basically I have a set of x, y data (around 1,000 elements each) and I > want to create

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Jonathan Hilmer
Andrea, Here is how to do it with splines. I would be more standard to return an array of normals, rather than two arrays of x and y components, but it actually requires less housekeeping this way. As an aside, I would prefer to work with rotations via matrices, but it looks like there's no supp

Re: [Numpy-discussion] Creating parallel curves

2012-02-12 Thread Andrea Gavana
HI Chris and All, On 10 February 2012 17:53, Chris Barker wrote: > Andrea, > >> Basically I have a set of x, y data (around 1,000 elements each) and I >> want to create 2 parallel "curves" (offset curves) to the original >> one; "parallel" means curves which are displaced from the base curve >> by

Re: [Numpy-discussion] Creating parallel curves

2012-02-10 Thread Chris Barker
Andrea, > Basically I have a set of x, y data (around 1,000 elements each) and I > want to create 2 parallel "curves" (offset curves) to the original > one; "parallel" means curves which are displaced from the base curve > by a constant offset, either positive or negative, in the direction of > th

[Numpy-discussion] Creating parallel curves

2012-02-10 Thread Andrea Gavana
Hi All, my apologies for my deep ignorance about math stuff; I guess I should be able to find this out but I keep getting impossible results. Basically I have a set of x, y data (around 1,000 elements each) and I want to create 2 parallel "curves" (offset curves) to the original one; "paralle