Find all sources here : https://www.grasshopper3d.com/forum/topics/maze-from-mesh
We will use the 0.5 version from this page : https://www.grasshopper3d.com/forum/topics/maze-from-mesh but the 0.9 can be also tested.
Set the Start Position
The program name
And the End position
The starting point is defined. Connect Point to Position and Circle to access Radius
Same with the End position
Add a Boolean Toggle
Pause is set in the middle of the Maze (why not). The Program is connected.
Then we create the person Template
We connect Start Gate, End Gate and Interrest
Add Vision Angle
The Person Template is set
Let’s Add the Ped Simulation System
Connection Target to Target and Person Templates to Person Templates
Obstacles are taken from the curves
Ped Simulation System is complete
Launch the simulation
Let’s a person
Path is drawn
We can add an Isovist simulation to represent the vision of the user
Let’s put a deconstruct person connected to people
We will then use the decoding spaces tool https://toolbox.decodingspaces.net/
It is much more efficient than the one in Grasshopper.
Grap lines from the Maze’s curves include the Square as well and Explode it into segments. Flatten
Grab Angle and Distances from the Person Template and connect Velocity to a Vector with viewing Direction
Even with more complex Maze, the exit path is found
Last step would be to have an object properly oriented that gives the direction of displacement in the Maze.
Like an arrow. Let’s draw an arrow
The Arrow can be attached to the points but it has to be correctly oriented.
When it’is not it give this
It globally works, some improvements are needed.