Consider the following:
Currently, I'm programming a very basic dungeon generator. Right now, it works like this:
Generate an int[][] hyperarray of arbritrary lengths.
Place rooms at random coordinates in this hyperarray (we'll call it maze for now.) using a for loop that fills the heigth and width of the room with 1's in maze. For game engine purposes 0 means not traversable (a wall.) and 1 means traversable by the player/enemies.
Start a perfect maze generator at 0,0 and run until all the space inbetween the rooms is filled with corridors.
Connect rooms to corridors, remove dead ends, you're left with a system of interconnected rooms.
Like this
Now I'd like to jazz up these rooms because they're just flat rectangles. What I now need to do is find a way to generate a polygon inside the int hyperarray (coordinates will probably do fine, this isn't the problem) and then fill the space of the polygon in the hyperarray with 1's (the part I'm having trouble with).