Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fill point maximum
#1
Many of you know how "filling" an area with a certain color works. As some of you may also know, this is how the simplest pathfinding (search) works, too.

Now, the algorithm in question starts from one single point and moves out until there is nothing left to fill. From that point, 4 (or 8) points around it are checked, and then the points around them are checked, and so on. Call the points-to-be-checked the "fill points": any algorithm stores those fill points for the next iteration.

The challenge is to figure out a precise equation for a fill point maximum, given that the 2D array is of size xmax and ymax.

Assume that the fill progresses in 4 directions: N, S, E, W. (or 8 directions, or both combinations, if you're up to it)

The "block points" would be any points that stop the progression of fill points. On the map, "block points" can be in any combination. The fill point maximum comes from one particular arrangement of block points so that there is a maximum of fill points active at one time.

Here are two possible scenarios: (extremes)
1) No block points. Fill point maximum for that arrangement is:
(x ^ 2 + y ^ 2) * 4
(the fill pattern progresses in a diamond shape)

2) Maze configuration.
Assume that the maze looks like this:

Code:
|=====|
|     |
| |=| |
|   | |
|===| |
      |
======|

Thus, this gives a fill point maximum of 2.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Messages In This Thread
fill point maximum - by Agamemnus - 02-17-2004, 09:46 PM
fill point maximum - by Agamemnus - 02-18-2004, 05:02 AM
fill point maximum - by broan496 - 02-18-2004, 05:11 AM
fill point maximum - by PlayGGY - 02-21-2004, 11:21 AM
fill point maximum - by KiZ - 02-21-2004, 05:56 PM
fill point maximum - by Agamemnus - 02-21-2004, 07:19 PM
fill point maximum - by Antoni Gual - 02-22-2004, 02:14 AM
fill point maximum - by Agamemnus - 02-22-2004, 02:22 AM
fill point maximum - by PlayGGY - 02-22-2004, 07:31 AM
fill point maximum - by Agamemnus - 02-22-2004, 08:12 PM
fill point maximum - by PlayGGY - 02-22-2004, 09:47 PM
fill point maximum - by Agamemnus - 02-22-2004, 11:25 PM
fill point maximum - by Antoni Gual - 02-23-2004, 01:55 AM
fill point maximum - by Agamemnus - 02-23-2004, 04:17 AM
fill point maximum - by Antoni Gual - 02-23-2004, 02:27 PM
fill point maximum - by Agamemnus - 02-23-2004, 06:59 PM
fill point maximum - by Antoni Gual - 02-23-2004, 07:58 PM
fill point maximum - by Agamemnus - 02-23-2004, 08:15 PM
fill point maximum - by Agamemnus - 02-24-2004, 05:59 AM
fill point maximum - by Antoni Gual - 02-24-2004, 03:22 PM
fill point maximum - by Agamemnus - 02-25-2004, 12:30 AM
fill point maximum - by Antoni Gual - 02-25-2004, 02:52 AM
fill point maximum - by Antoni Gual - 02-24-2004, 01:19 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)