Boustrophedon Path Planning

This is the place for queries that don't fit in any of the other categories.

Boustrophedon Path Planning

Postby Alligator » Tue May 20, 2014 12:27 am

I'm looking to create some code for a boustrophedon path planner. Unfortunately, this code is beyond my current skill level, so it will take me a while to learn. To start, I have some general questions:

1. Is there a way to handle a polygon in python?
2. Is there a method to look for the vertices of a polygon?

For example, I'd like to handle the following shapes (using coordinates):

Last edited by micseydel on Tue May 20, 2014 3:05 am, edited 1 time in total.
Reason: Locked.
Posts: 1
Joined: Tue May 20, 2014 12:23 am

Re: Boustrophedon Path Planning

Postby micseydel » Tue May 20, 2014 4:37 am

Hello, and welcome to the forum! Your questions are a bit vague, so forgive me if it takes a few posts to properly answer your question. I'm going to assume that a boustrophedon path isn't something I need to Google, since you didn't explain what it was, so feel free to correct that assumption if necessarily.

Alligator wrote:1. Is there a way to handle a polygon in python?

What do you mean by "handle"? Do you mean "graphically manipulate as the end-user"? Or something else?

Alligator wrote:2. Is there a method to look for the vertices of a polygon?

This question implies that there are some basic of Python that you really ought to learn before tackling this larger problem. I recommend this tutorial, and then learning object-oriented programming* (unfortunately, I don't know of any good source for this, hopefully others do). I say this because when I think of how to store a polygon, the first thing that comes to mind is simply storing their vertices. I think it would be helpful for you to learn the basics of how things work so that when you ask questions they wouldn't require us to recommend prerequisite material the size of a tutorial.

That said, how you want to approach this is of course up to you. If I understand you correctly, pygame is likely what you want. It may have facilities for handling polygons directly, but it may require you "roll your own".

* Object-oriented programming is a somewhat advanced topic in programming. At the university I attended, it was usually a 2nd year course for people majoring in computer science, considered a "weeder" class and it was something that I learned incorrectly myself and had to have corrected during the course. I have never found a satisfactory tutorial or anything online that covers it. I tried to write one for this forum and found it extremely difficult. But it's essential to most modern graphical programming, games programming, mobile app programming, and many other fields in programming.
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 2992
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot] and 7 guests