Skip to main content
deleted 79 characters in body; edited title
Source Link
Ted
  • 121
  • 2

How to completey coverfind out if a tile is being covered by a polygon with rectangular tiles?

Given a (intersecting) polygon, I'd like to cover it with rectangular tiles. I'd like to use as fewfind out which tiles as possible but enough to be sure thatare being covered by the whole polygon is covered.

Example:

example

Details:

  • Tiles are square, 1 unit wide/high
  • The grid begins in (0,0)
  • The corners of the polygon can have floating point coordinates (i.e. 3.433, 5.234)
  • In general, an edge of the polygon might be as long as 1000 - 10000 tiles

I tried to iterate over all tiles and check whether they are in the polygon, however as I have to iterate over 10000² tiles it takes a quite a long time.

I'm interested in a solution which allows me to quickly answer "Is tile (x,y) covered by the polygon?" without recomputing everything from scratch for each question.

Any solution/approach/pseudo-code/hint which leads me to a correct solution will be accepted.

How to completey cover a polygon with rectangular tiles?

Given a (intersecting) polygon, I'd like to cover it with rectangular tiles. I'd like to use as few tiles as possible but enough to be sure that the whole polygon is covered.

Example:

example

Details:

  • Tiles are square, 1 unit wide/high
  • The grid begins in (0,0)
  • The corners of the polygon can have floating point coordinates (i.e. 3.433, 5.234)
  • In general, an edge of the polygon might be as long as 1000 - 10000 tiles

I tried to iterate over all tiles and check whether they are in the polygon, however as I have to iterate over 10000² tiles it takes a quite a long time.

I'm interested in a solution which allows me to quickly answer "Is tile (x,y) covered by the polygon?" without recomputing everything from scratch for each question.

Any solution/approach/pseudo-code/hint which leads me to a correct solution will be accepted.

How to find out if a tile is being covered by a polygon?

Given a (intersecting) polygon, I'd like find out which tiles are being covered by the polygon.

Example:

example

Details:

  • Tiles are square, 1 unit wide/high
  • The grid begins in (0,0)
  • The corners of the polygon can have floating point coordinates (i.e. 3.433, 5.234)
  • In general, an edge of the polygon might be as long as 1000 - 10000 tiles

I tried to iterate over all tiles and check whether they are in the polygon, however as I have to iterate over 10000² tiles it takes a quite a long time.

I'm interested in a solution which allows me to quickly answer "Is tile (x,y) covered by the polygon?" without recomputing everything from scratch for each question.

Any solution/approach/pseudo-code/hint which leads me to a correct solution will be accepted.

clarified question
Source Link
Ted
  • 121
  • 2

Given a (intersecting) polygon, I'd like to cover it with rectangular tiles. I'd like to use as few tiles as possible but enough to be sure that the whole polygon is covered.

Example:

exampleexample

Details:

  • Tiles are square, 1 unit wide/high
  • The grid begins in (0,0)
  • The corners of the polygon can have floating point coordinates (i.e. 3.433, 5.234)
  • In general, an edge of the polygon might be as long as 1000 - 10000 tiles

I tried to iterate over all tiles and check whether they are in the polygon, however as I have to iterate over 10000² tiles it takes a quite a long time.

I'm interested in a solution which allows me to quickly answer "Is tile (x,y) covered by the polygon?" without recomputing everything from scratch for each question.

Any solution/approach/pseudo-code/hint which leads me to a correct solution will be accepted.

Given a (intersecting) polygon, I'd like to cover it with rectangular tiles. I'd like to use as few tiles as possible but enough to be sure that the whole polygon is covered.

Example:

example

Any solution/approach/pseudo-code/hint which leads me to a correct solution will be accepted.

Given a (intersecting) polygon, I'd like to cover it with rectangular tiles. I'd like to use as few tiles as possible but enough to be sure that the whole polygon is covered.

Example:

example

Details:

  • Tiles are square, 1 unit wide/high
  • The grid begins in (0,0)
  • The corners of the polygon can have floating point coordinates (i.e. 3.433, 5.234)
  • In general, an edge of the polygon might be as long as 1000 - 10000 tiles

I tried to iterate over all tiles and check whether they are in the polygon, however as I have to iterate over 10000² tiles it takes a quite a long time.

I'm interested in a solution which allows me to quickly answer "Is tile (x,y) covered by the polygon?" without recomputing everything from scratch for each question.

Any solution/approach/pseudo-code/hint which leads me to a correct solution will be accepted.

Source Link
Ted
  • 121
  • 2

How to completey cover a polygon with rectangular tiles?

Given a (intersecting) polygon, I'd like to cover it with rectangular tiles. I'd like to use as few tiles as possible but enough to be sure that the whole polygon is covered.

Example:

example

Any solution/approach/pseudo-code/hint which leads me to a correct solution will be accepted.