Filtering and sorting streamlines for modular labyrinthine structures

Hello

I am currently developing an experimental script inspired by the PixPort Lagos project by SA lab. My goal is to generate similar modular, labyrinth-like volumes using an algorithmic approach.

Here is the core diagram of their form-finding strategy. At first glance, the logic seems quite linear, conventional, and straightforward:

Issue:
I have completed a first iteration, but I’ve run into some challenges during the discretization and curve-sorting stage. As seen in my “rough attempt” (attached below), the geometry is currently “clumping” together into a dense, unorganized mass. I am struggling to implement a clean logic for filtering these curves to keep only the primary, long-reaching paths while maintaining a readable structure:

Discrete Vortex.gh (117.3 KB)

Workflow:

  1. Generate a vector field based on the site/input geometry.
  2. Extract streamlines from the field.
  3. Discretize and filter the curves.
  4. Convert the resulting lines into modular architectural volumes.

Questions:

  1. Filtration & Collision: What is the best principle for sorting and filtering these curves to ensure the final modules don’t conflict with one another? Should I be looking into proximity-based checks or specific culling patterns?
  2. Field Optimization: How can I refine the initial vector field to achieve a more uniform and parallel distribution of streamlines, avoiding “knots” or overly dense clusters around attractors?

I have attached my script and would be incredibly grateful for any advice, corrections, or alternative workflow suggestions you might have.

Thanks in advance for your help!

Hi Ilya,

watching the video, I believe it is a voxel-based strategy similar to the techniques introduced and explored by Gilles Retsin, Manuel Gimenez-Garcia, Daniel Widrig and others at the Bartlett, circa 2015-2016 (linke this one, for instance: Bartlett Students Develop New Method for 3D Printing Concrete | ArchDaily). There was a bunch of projects based on dicretizing trajectories into voxelized space.

The key giveaway in the video is the brief sequence around 0:18 (don’t be fooled by the morph effect, it’s just for show):



If you overlap the images you can notice it quite clearly (there is also a process of culling in the first overlap):


So, the strategy would be:

. discretize a box volume into voxels
. split each voxel into 2 “halves”, for example along the X axis, so you have a Y-up and a Y-down half
. for each half, get the volume centroid and get the closest curve’s tangent from that
. if the closest curve is outside the voxel, do nothing, otherwise:
. approximate the tangent vector to a _ | / or \ segment (vertical, horizontal or diagonal)
. join all the resulting segments inside each voxel into 2-segments polylines
. fillet the resulting polylines’ sharp corners
. extrude them to form the volumes

Now, some of the above steps might not be 100% correct for the case, but they are just to give you a start with the logic.

3 Likes

@leopoldomonzani Did you mean to post to this thread?

Thanks for letting me know, I must have posted in the wrong thread.

Hello @ale2x72 :blush:
Thank you! That’s a really interesting idea; I’m currently trying to implement it in the model…

Well, it’s not quite working out anyway; maybe my vector field isn’t quite right…:sweat_smile:

Discrete Vortex v2.gh (29.1 KB)

Hello
I didn’t read the whole thread, I made some components in Nautilus to clean polylines
One to cut every “angle of turn” and one to suppress overlap (beware of distance between curves if too low the component can be very slow, better to kill the process)

BUT curves stay in 3d, perhaps better to use some projection or Nautilus has special components that use field and keep trajectories on a mesh

Discrete Vortex LD.gh (922.7 KB)

2 Likes

Hi, I don’t have the time to check .gh files at the moment, but I fished something off of my 2017 archive. The project I was studying is the Bartlett RC4 Voxatile: https://www.behance.net/gallery/52165009/RC4-Voxatile

Back then I cooked up a gh definition that does something very similar, just straight from the field vectors sampled at the voxels’ centre (but you can easily adapt it to work by sampling curves tangent vectors):


discrete_test_01.gh (63.7 KB)
The logic is explained step-by-step in the definition (I misremembered a couple of them when I first posted straight form my bad memory…).
I ended up using it to print customized gift wrapping paper :sweat_smile:

I hope this gives you a start!

3 Likes

If you printed it on pink paper, it would have been very pretty indeed.

Cool
here I tried with my tools.
I generate a path inside each polygon as a mesh, then I search the closest point between ends and polygon points.


discrete_test field LD.gh (49.0 KB)

Interesting with Hexagon and 3 points
I color group of network of curve


Hexagons 4 points

discrete_test field LD2.gh (19.3 KB)

3 Likes