Courseplay / CourseGenerator

Fieldwork Course Generator 2.0
GNU General Public License v3.0
9 stars 4 forks source link

Vine Course Generation features needed #9

Open schwiti6190 opened 1 year ago

schwiti6190 commented 1 year ago

These parameters have to be considered for a valid course generation

pvaiko commented 1 year ago
  • fixed starting point, that needs to be crossed by the first lane

  • fixed lane world direction/rotation

@schwiti6190 can you explain these two?

schwiti6190 commented 1 year ago

@pvaiko

The found field border is not straight enough and is not correct, so search for vine node in the border and use it to generate a valid context in combination with the field border.

A line of a vine vield is separated into multiple line, where each line is separated into multiple small tiles. We use one tile to get the world direction of the vine field, which only consists of parralell line with the same direction. Also use the tile position to get the vector of the vine lines. Each line is sparated by a fixed delta which would be the work width in terms of the course generator

pvaiko commented 1 year ago

For most of this we already have the building blocks, so should be easy. @schwiti6190 what's missing is the length of the rows. Are all rows of the same length? If yes, the easiest would be to just pass in the coordinates of the first and the last node of the first row, a working width, number of rows and either direction (left or right) in which to add rows to the first row, or just the coordinates of any node in any other row, the generator then can figure out the rest.

Maybe coordinates of the first and last point of the first row and first point of the last row?

pvaiko commented 9 months ago

@schwiti6190, could we use https://github.com/Courseplay/CourseGenerator/blob/e3b99a11bd09ca628386941975fec914fef15668/CourseGenerator/Island.lua#L51 to create the field polygon from the list of vine node positions? That, the start and the direction of the first row would be sufficient to create all rows.

schwiti6190 commented 9 months ago

@pvaiko We could try it out, but i am not sure if the current VineScanner is even working correctly for non rectangle fields.