Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-15 Thread Laura Kauria
Okay I'll try. What the main job is to do an algorithm which simples a line. Algorithm deletes points which are unnecessary accurate according to tolerance distance user gives. I started by converting the pseudocode I had to python. Pseudocode:

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-14 Thread Laura Kauria
Thanks a lot for all the help! I got the courage to start at least.. I started by converting the pseudocode I had to python. Still I have problems with perpendicular distance and creating a line with python. I need to create a line between two points and then check what is the distance between a

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-14 Thread bob gailer
On 4/14/2014 11:30 AM, Laura Kauria wrote: Thanks a lot for all the help! I got the courage to start at least.. Some requests regarding posts. 1) put your comments following the relevant text rather than at the top. 2) delete old (irrelevant) text. 4) be more clear with your questions. I

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-14 Thread Laura Kauria
Hi, sorry I don't know the conventions yet. I'd need to know how to create a line between two points. I don't know after many hours checking, how to convert this pseudocode to python. line = new Line( pointList[startPoint], pointList[endPoint]) I've done point list and indexes already, put

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-14 Thread Alan Gauld
On 14/04/14 16:30, Laura Kauria wrote: I need to create a line between two points and then check what is the distance between a line and intermediate points which were between lines start and end point. When you say you want to create a line what do you mean? Do you want to - create a line in

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-14 Thread Alan Gauld
On 14/04/14 21:21, Laura Kauria wrote: line = new Line( pointList[startPoint], pointList[endPoint]) line = Line(pointList[startPoint], pointList[endPoint]) is the translation. But that probably doesn't help much. I've done point list and indexes already, put don't know how to create the

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-14 Thread Ben Finney
Laura Kauria lacat...@gmail.com writes: Thanks a lot for all the help! I got the courage to start at least.. Congratulations! Courage is a necessary ingredient when starting :-) Could you please avoid top-posting, and instead use interleaved style

[Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-06 Thread Laura Kauria
Hi all, I'm new with python and have done little coding with Java. At uni I would need to start a coding task with python writing a proper/working code and we don't get much help at school. Can someone help with which kinds of libraries I need to download to start to work with lists consisting

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-06 Thread Alan Gauld
On 06/04/14 09:46, Laura Kauria wrote: Can someone help with which kinds of libraries I need to download to start to work with lists consisting coordinates? It depends what you are doing but you may not need to download anything. Like Java Python has a large standard library of modules. Also

Re: [Tutor] Python algorithms (Lang line simplification algorithm)

2014-04-06 Thread Danny Yoo
Hi Laura, Algorithmic code typically is simple enough that standard language features should suffice. I think you might pick up an external library to make it easier to visualize graphical output, but the core algorithms there appear fairly straightforward. To get some familiarity with basic