Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-18 Thread Pete O'Connell
Thanks Stephen. That looks like nice clean code too! Cheers Pete On Tue, Sep 18, 2012 at 9:59 AM, Stephen Haywood < step...@averagesecurityguy.info> wrote: > Someone has already tried. https://github.com/sebleier/RDP > > > On Mon, Sep 17, 2012 at 5:50 PM, Pete O'Connell > wrote: > >> When I ha

Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-17 Thread Stephen Haywood
Someone has already tried. https://github.com/sebleier/RDP On Mon, Sep 17, 2012 at 5:50 PM, Pete O'Connell wrote: > When I have a bit more time I am going to try to implement the > Ramer–Douglas–Peucker algorithm to improve the accuracy of my curve > simplification: > > http://en.wikipedia.org/w

Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-17 Thread Pete O'Connell
> 1) You have a Bezier curver consisting of 20 control points and would like > to > approximate it with a simpler cubic Bezier curve consisting of only 4 > points. > I would call this "approximating a Bezier with a lower order Bezier". > > Hi Oscar. Thanks for your reply. This one above is the one

Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-17 Thread Oscar Benjamin
On 2012-09-17, Steven D'Aprano wrote: > On 17/09/12 11:15, Pete O'Connell wrote: >> Hi, I have a bezier line with 20 points on it and I am trying to reduce >> this to a line with 4 points, keeping the first and last points and 2 >> evenly spaced points in between like so: > > In general in Python,

Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-16 Thread Steven D'Aprano
On 17/09/12 11:15, Pete O'Connell wrote: Hi, I have a bezier line with 20 points on it and I am trying to reduce this to a line with 4 points, keeping the first and last points and 2 evenly spaced points in between like so: In general in Python, it is faster and much easier to create a new list

Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-16 Thread Pete O'Connell
Ah of course. Thanks very much Oscar! Pete On Mon, Sep 17, 2012 at 1:29 PM, Oscar Benjamin wrote: > On 17 September 2012 02:15, Pete O'Connell wrote: > >> Hi, I have a bezier line with 20 points on it and I am trying to reduce >> this to a line with 4 points, keeping the first and last points an

Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-16 Thread Oscar Benjamin
On 17 September 2012 02:15, Pete O'Connell wrote: > Hi, I have a bezier line with 20 points on it and I am trying to reduce > this to a line with 4 points, keeping the first and last points and 2 > evenly spaced points in between like so: > ** > becomes: > *. . .