Reordering the points by vector

I was trying to recreate the Windows XP 3D pipe screensaver and have faced one issue. How do I reorder the points or create the path to follow the certain rule: the next point of the path is chosen randomly betwee vectors (1,0,0), (-1,0,0), (0,1,0), (0,-1,0), (0,0,1), (0,0,-1). Or maybe someone would have different approach towards recreating the XP screensaver concept. The main goal is to make it recreate certain shape.

Might be worth checking out Anemone plugin.

Hi @Yurii_Petryna

searching in points and reordering sounds more like a recursive function but instead you could create points out of random created vectors multiplyed by the distance.

In my example the direction is not limited by the negative world coordinate segments.

random_grow.gh (12.2 KB)

In the second example i tried to eliminate identical line segments which works only for some cases.

Doing this with a recursive function is maybe a better approache maybe i try it later.

2 Likes

this could be a very basic approach with Anemone… it can’t self-intersect because of this:

and if it happens it goes into a hole it can’t excape from, it will just stop :slight_smile:

basic_random_walker.gh (17.2 KB)

3 Likes