POV-Ray : Newsgroups : povray.advanced-users : A-Star algorithm Image Test : A-Star algorithm Image Test Server Time
25 Jul 2024 09:54:39 EDT (-0400)
  A-Star algorithm Image Test  
From: Bald Eagle
Date: 9 Sep 2023 13:20:00
Message: <web.64fca905c32c9bfa1f9dae3025979125@news.povray.org>
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'
a-star image.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.