|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So, I grabbed some code off the wayback machine for the A* algorithm in visual
c++, and converted all of that to POV-Ray SDL.
Although I still probably need to go back in and fix some the
late-night/early-morning edits/hacks that I did in order to get it to run to
completion without errors, it looks like it works.
After hand-coding some obstacles in the map array, I figured that I ought to try
it with a real maze, and the easiest thing to do there was use an image (plus
that would move me in the direction of applying this to meshes)
So after a few false starts, I got everything nicely framed on the page, and it
took this implementation 2 min 20 sec to solve a 500*500 pixel maze image (parse
& render).
Enjoy.
- BE
Post a reply to this message
Attachments:
Download 'a-star image.png' (805 KB)
Preview of image 'a-star image.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"Bald Eagle" <cre### [at] netscapenet> wrote:
> So, ... Enjoy.
wow. _v_ cool. (I'm turning that shade of green again.. :-))
hope you'll publish "a tutorial" on the topic.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> wow. _v_ cool. (I'm turning that shade of green again.. :-))
Hi jr,
I just took a stab at it, and had a few moments where I was feeling like I had
bit off more than I could chew. As you can imagine, I get that feeling often.
I kinda get how it works - the gist - but there are a few things that I haven't
cleared up, and I haven't looked at the binary heap optimization part.
I basically just edited the code and kept running it and hacking it until it ran
without errors.
> hope you'll publish "a tutorial" on the topic.
I will not, until I have something significantly different from the code I
copied.
https://web.archive.org/web/20051230122239/http://www.policyalmanac.org/games/aStarTutorial.htm
code:
https://web.archive.org/web/20051230122239/http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=turtle17
7604062002002208&comments=no
Other stuff at:
http://theory.stanford.edu/~amitp/GameProgramming/
Sebastian Lague: https://www.youtube.com/watch?v=mZfyt03LDH4
Daniel Schiffman: https://www.youtube.com/watch?v=EaZxUCWAjb0
Now with regard to TdG's desire to erode terrain, I wanted to find a heightfield
that I could use to run a height-driven A* algorithm on, and wouldn't you know
it - I found a bunch of interesting links.
https://ranmantaru.com/blog/2011/10/08/water-erosion-on-heightmap-terrain/
https://github.com/dandrino/terrain-erosion-3-ways
Sebastian Lague: https://www.youtube.com/watch?v=eaXk97ujbPQ
https://github.com/LanLou123/Webgl-Erosion
https://jobtalle.com/simulating_hydraulic_erosion.html
https://perso.liris.cnrs.fr/aparis/public_html/posts/terrain_erosion.html
and lots more, I'm sure.
Since this is essentially a cost-optimization algorithm, I was also thinking
that maybe this kind of thing could be used to trace electrical circuits, or
something like that.
Also, conducting erosion on a 3D objects could give more interesting clouds if
rendered as a df3.
- BW
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 9/9/23 13:19, Bald Eagle wrote:
> After hand-coding some obstacles in the map array, I figured that I ought to try
> it with a real maze, and the easiest thing to do there was use an image (plus
> that would move me in the direction of applying this to meshes)
Cool! :-)
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 09/09/2023 19:19, Bald Eagle wrote:
> So, I grabbed some code off the wayback machine for the A* algorithm in visual
> c++, and converted all of that to POV-Ray SDL.
>
> Although I still probably need to go back in and fix some the
> late-night/early-morning edits/hacks that I did in order to get it to run to
> completion without errors, it looks like it works.
>
> After hand-coding some obstacles in the map array, I figured that I ought to try
> it with a real maze, and the easiest thing to do there was use an image (plus
> that would move me in the direction of applying this to meshes)
>
> So after a few false starts, I got everything nicely framed on the page, and it
> took this implementation 2 min 20 sec to solve a 500*500 pixel maze image (parse
> & render).
>
> Enjoy.
>
> - BE
>
How brave ! Very good job Bill
--
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|