Grasshopper

algorithmic modeling for Rhino

During thickening a network of curves I wanted network with dead ends. Mazes were good candidates to obtain dead ends and continous path. I looked at  Mac Gros definition  :

and to some others explanations  :


I implemented two algorithms generating perfect maze (one path to whatever point to whatever point) recursive backtracker and Kruskal's algorithm. These algorithms are applied to mesh were the edges are walls and the centers of faces are used for paths.

Perhaps Andrei Nejur IVY components could be used but, the ones I have tested are not enough random.

 

The components are very simple you have just to input a mesh (welded) and a seed (integer) for random object. The components outputs List of lines for walls and path (just one).

Recursive Backtracker
Kurskal

Views: 20701

Replies to This Discussion

No I didn't know I discovered that after, that there is a blender add-on. 

I began seeking the path of maze in Mac Gros Script, his script just output walls and after that I began reading a lot the algorithms (see 2 other links) on my way to job/home in the bus. I began with Kruskal because it was the simplier for me. The other seemed to work well so I decided to test it. Before that I wrote pseudo algorithm on paper. It seems also true that some others algorithms will surely not work for mesh, Eller because it is row algorithm. But who knows. 

I discovered also after that IVY used these types of algorithm to "walk" the mesh. Graph theory is HUGE !

Great stuff! Can't wait to try this!

I continue to work on this subject. I began now to implement different class to "drive" on the mesh. The idea is to generate textures. Random is working. I did ZigZag and began a directional driving. Here an example with Y direction if X is negative, and X direction if X positive. The amount of randomness could be choosen.  

A concern I have is that mazes are great as surface decoration but for open latticework they are not very strong since there's not many crosslinks so the rope size must be  substantial enough to self support a very long distance and further branching adds even more weight a single segment must support.

Adding crosslinks to limit the maze path lengths would retain the aesthetics but afford structurally viable fine latticework surfaces.

Nik your concern doesn't seem easy to implement, a sort of mechanical modelling will be needed, add  weight, support ... to find maximum deflection and add where needed support. It is surely doable with Kangaroo. At the moment I just add a mesh output which is closed if the input mesh in closed. 

Nik for curiosity I began to look not at Kangaroo but Karamba, I manage to make differences between full grid and maze movements considering some fixed points . 

Here is a first drawing. I still need to have idea of a real object dimension in order to have good relatives differences. I think I have now the same problems as King Kong (not possible for him to exist except if it has titanium bones !!). But it is fun to do mechanics like at school except that 20 years ago it was far less fun. The tools were not so cool.

4 fixed points.

My scale is lately metal jewelry with 3D printing concerns of both small features being rejected by services but then also minimal allowed thicknesses not being strong enough.

Hmm, the basic addition of crosslinks is perhaps quite easy in a maze since each path through it and to dead ends could just be shortest walked from a single starting point and then divided into n number of open boxes, say 15 or 20, with cross bars added between them.

My strategy would be uniform overengineering rather than stress test selected.

Here is a new version of Maze Maker which can output Mesh and Lines network for walls and path. There are also some "drivers" on mesh 

  • random one
  • a directionality driver  with some random
  • a zig zag
  • try to return back (turn always left or right)

If you disconnect the type of driver "Value list" it automatically adds one new "Value list". 

The paths can be used with lines but also topology (Pp =>points, PPs =>line described with the two indexes of points, Normalsp => normal at each point). So you can plug directely to the script

http://www.grasshopper3d.com/forum/topics/thicken-a-network-of-line...

At the moment there is just the recursive backtracking and it works just with triangular and quad meshes. Meshes can be opened or closed. But it mesh topology is not good (duplicate face ...) it doesn't work. 

A-maze-ing ....... more interesting then the Hilbert Cube :)I tried to trace a path across 2 maze faces, starting from either diagonally opposite vertexes and ending up at the opposite vertex .... I gave up! :(

Cool to see the cube. You can use shorteswalk script to find the minimum path. It is more easy :)

http://www.food4rhino.com/project/shortestwalkgh?etx

There is a plethora of experimenting available with the scripts Laurent recent contribution to this forum. :)

Reallly, really nice!

Do you have any source files you would be willing to share? This would be so helpful in learning techniques for current project. Would like to use it to dimple voroni with spherical impressions.

Cheers Kim

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service