 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel wrote:
> - create a delauney triangulaton
BTW, do you have code to do that sitting about? I've found various
algorithms, but the speed with which you threw that together seems
impressive. :-)
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel wrote:
>> This is the unit test for my rectangular maze code:
>> http://www.youtube.com/watch?v=X2mkwcfEd_8
>>
>
> Haven't got a clue what is going on.
That's why it's not a public link yet.
1) Create all the rooms with possibly-destructable (grey) walls.
2) Caller marks some rooms as "pre-open" (green), blocked (red) or post-open
(blue). So, the top left green might be a tennis court, the bottom left
green might be a drive and parking lot, the red in the middle might be a
building, the other red might be a swimming pool with a path around it, and
the blue might be where a part of the maze burned down after it was built.
So "green" acts as one big room, while "blue" has the possibility of adding
loops to the maze.
3) Mark blocked walls and walls open inside a blocked area.
4) Repeatedly pick a grey wall and examine the rooms on either side. If the
rooms are connected, make the wall black. If they're not, make the wall
white, then flood fill the smaller area to mark it as connected to the
larger area (the yellow). Stop when you've examined all walls.
5) Blow up any walls son the border of a blue room, even if that means
creating a new connection between rooms already connected.
Then, some demos of the path-finding:
A) Pick a goal room in Cyan.
B) Flood-fill from that room with the distance to the goal.
C) Put a logo in another room.
D) Repeatedly move the logo to the adjacent room with the lower
distance until you get to the goal.
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 16-11-2010 18:38, Darren New wrote:
> andrel wrote:
>> - create a delauney triangulaton
>
> BTW, do you have code to do that sitting about? I've found various
> algorithms, but the speed with which you threw that together seems
> impressive. :-)
>
D=delaunay(X,Y);
sorry, I though I said I was using Matlab ;) I think it is even in the
standard library.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 16-11-2010 18:38, Darren New wrote:
> andrel wrote:
>> - create a delauney triangulaton
>
> I've found various
> algorithms, but the speed with which you threw that together seems
> impressive. :-)
The speed may also be explained by having experience with these
functions, doing a lot of triangulations and writing toolboxes to
support that. Actually I was home today to create a number of meshes
though they are mostly quads and not triangles. This was a nice break
from mousing all the time. And I did create programs to build and solve
mazes before, but haven't we all?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 16-11-2010 18:16, Darren New wrote:
> I was also thinking, just stylistically, to treat triangles like walls
> also, so you could have a much bigger triangle with walls of varying
> widths. This will let me have (say) a maze of cliffs and crags (i.e.,
> where instead of walls you have deep chasms), or a maze of paths through
> water or lava or something you can't really cross.
well, here is your own special planet where there is just one path
between each point on the surface ;)
Post a reply to this message
Attachments:
Download 'maze3.png' (333 KB)
Preview of image 'maze3.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel wrote:
> well, here is your own special planet where there is just one path
> between each point on the surface ;)
Sweeeet. I bet you could make some sort of sci-fi out of that concept.
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> andrel wrote:
> > well, here is your own special planet where there is just one path
> > between each point on the surface ;)
>
> Sweeeet. I bet you could make some sort of sci-fi out of that concept.
>
> --
> Darren New, San Diego CA, USA (PST)
> Serving Suggestion:
> "Don't serve this any more. It's awful."
Pretty cool, and sci-fi for sure; it's a similar concept to how the great river
on Riverworld must be, covering the entire planet surface with a single river
having huge unclimbable cliffs on each side, all the way to the source.
-------------------------------------------------
www.McGregorFineArt.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 20-11-2010 21:15, Robert McGregor wrote:
> Darren New<dne### [at] san rr com> wrote:
>> andrel wrote:
>>> well, here is your own special planet where there is just one path
>>> between each point on the surface ;)
>>
>> Sweeeet. I bet you could make some sort of sci-fi out of that concept.
>>
>> --
>> Darren New, San Diego CA, USA (PST)
>> Serving Suggestion:
>> "Don't serve this any more. It's awful."
>
>
> Pretty cool, and sci-fi for sure; it's a similar concept to how the great river
> on Riverworld must be, covering the entire planet surface with a single river
> having huge unclimbable cliffs on each side, all the way to the source.
>
My idea was indeed that it could be used in a sci-fi scene, except I
hadn't a clue what the context should be. That is why I did not spend
much time on the details of this scene.
If anyone has a great idea or wants to use such a tree of lines that
span a sphere or plane, just ask. For me it was fun to prove that it
could be done, that's all. I guess I am not going to take this further.
Unless someone got another challenge...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 15-11-2010 7:23, Darren New wrote:
> Say you have something like this, as a list of endpoints, not as a raster:
>
> http://www.puz.com/sw/amorphous/theory/amz1.jpg
>
> Any idea how one would go about finding the paths amongst this? I.e.,
> given just the endpoints of the line segments as floats, and without
> rasterizing it, how would you find your way from any point in the maze
> to any other point?
>
> In a raster-based maze, you can just flood fill out from your goal,
> incrementing the distance for each step, and then trace back along
> descending distances. (I.e., use a flood-fill to set the value in each
> room to be the distance to the exit, then always turn towards lower
> numbers.)
>
> But that technique assumes you have a fixed set of positions to test.
I almost forgot that this threat started with this question.
Attached is your a-mazeing planet. All 'mountains' (grey) and all
'rivers' (blue) are connected. There is also exactly one path between
two mountain-nodes and between two river-nodes. (I think the last two
lines are equivalent, but I don't feel like proving that ATM.)
If your maze is the rivers, walk over the mountain ranges. If the
mountains are the maze use the boat.
Both are simple connected trees, so to find your way around any tree
traversal routine will do.
I hope this answers your question ;)
Post a reply to this message
Attachments:
Download 'darrenworld.png' (491 KB)
Preview of image 'darrenworld.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
andrel wrote:
> I almost forgot that this threat started with this question.
Very cool. Thank you. :-)
> I hope this answers your question ;)
No, but the rest of the thread did. :-)
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |