Deform curves after random walk

If you’re still interested in trying this with random movers, I guess my previous post is probably a good starting point, however you need to extend the script a little:

First, you’d have to evaluate for each mover at each iteration whether it is still inside the desired boundary volume. If not or intersecting with the boundary, you need to compute a reflection vector as new velocity to make the mover turn back. You want to be a little lenient here, so that the mover can depass the boundary a little. Its trail will overall be much smoother, when it doesn’t have to make abrupt turns. Rope or twine does also flow nicely.

Furthermore, you’d have to record all particle trails, and check for collisions. Each trail would have an imaginary radius (twine thickness) that you want all movers to steer away from. This will come in handy later, because when you pipe the trails, you don’t want intersections.

@akilli’s suggestions seems easier to accomplish, although I think particles could potentially present more random, chaotic results, if that’s something that interests you.

Thank you. :slight_smile:

1 Like

Oh my! You gave me more than what I needed! Much appreciated!

I am light-years behind your python knowledge, though I made use (I think) of what you laid out - at least in thought (lol) and more brute-force :slight_smile:

One of the latest attempts involved using the curve derivative component to facilitate ‘averaging’ a ‘velocity’ vector from targeted regions, to then spatially deform the ‘ball of hairs’.

Here’s a screengrab where I played with multiple strands and difference in targeted region:


Here’s how it behaves when it’s a single strand:

So smooth and playful - I can only imagine what you’d come up with via your python expertise now that you can ‘see’ more of what I wanted.

Thanks again and best, @diff-arch

1 Like

Man, do I know this dilemma - that’s how come I can’t finish anything!

Nonetheless…

yes - I was oblivious to this potential route, which actually ended up making sense deformation-wise, expanding my play.

image

A quick look at what you did allowed me to change direction and think of ‘deformation planes’ for the spatial deform:

And then the breakthrough happened:

I learned so much!

Thanks!

This is what I call an “art project”. The outcome seems arbitrary, in the eye of the beholder. Cheers.

1 Like

Haha, I’m sure you did. I think maybe 1 to 2 years, not light years, and I’m a slow learner. :wink:

Sounds great and the results speak for themselves! Nice job and thanks for sharing some of it. I like how neatly you seem to organize, group, and annotate everything!

1 Like

You couldn’t have said it better - arbitrary indeed!

Reminded me of this ultimate truth:

4 Likes

2 Likes


random_walk_2020Sep11a.gh (15.2 KB)

1 Like

@Joseph_Oster,

You kept playing!
Thank you for sharing! I opened the file and felt immediately provoked.

First, more from what you helped me with on this ‘art project’ :



Here’s your ‘morph’ idea in full integration :wink:

Fun stuff!

Now with my interest on ‘the more scrunched the better’, I started playing with galapagos, very simple approach - just minimizing length of fitted line - maybe I can incorporate this logic to the big ball - what would you do?


random_walk_2020Sep11_b.gh (18.5 KB)

Thanks!

*edit:
I added ‘negatives’ to the domain start and swapped the graph for the perlin graph mapper because it ‘feels’ more ‘scrunchy’

*edit2:
Also I guess if galapagos cannot manipulate the graph mapper then it only serves the game partially, as playing with the graph mapper definitely predetermines the level (and beauty) of the ‘grown strand’

2 Likes

Well, it’s your art project, not mine. But since you asked…

I don’t see any value in letting Galapagos manipulate the ‘Number’ (of points) slider since it will converge on just two points. Likewise, I don’t see any reason to allow negative values (or even near zero values) on the ‘d’ (Offset distance) domain since lengths near zero will always be favored by shortest line “Fitness”. So that leaves only the ‘Seed’ slider which could be replaced by a Series component to compare 300 seed values.

Cheers.

1 Like

you’d be surprised! Not mine, but definitely in charge of making the arbitrary look ‘believable’.

got you, I do ‘favor’ the ‘maltreatment’ of the polylines once you go a bit negative - though at this point it’s irrelevant - I have achieved way more than what was needed!

Allow me to ‘come back’ with improved results after the pandemic :wink:

YES:
“fully acknowledge the emptiness of the experience”

LOL

1 Like

Well,
Two weeks later…

Everything obtained from this thread was magnificent and pretty, though I couldn’t achieve what I inquired about - and with good reason: {my own} stupidity :slight_smile:

Came to ask about deforming then didn’t deform anything!

You can’t expect SpatialDeform to do what you want without understanding what it does first…

(starting) random walk or growth or strand:

spatially deformed (what was needed):

Not as ‘arbitrary’ as my question was!

Thanks again for all you do,
keep rocking! :love_you_gesture:t5:

I don’t get why so many people always write about being/feeling stupid. In my opinion, there are no stupid people, some are just more motivated than others, and/or have easier access to information and knowledge that others don’t.

Yeah, there was maybe a little too much talk about “art projects”, which frankly was completely irrelevant, and ultimately got me disinterested.

You’re welcome, although I feel like I maybe wasn’t that helpful. :wink:

I must agree - I thank you and I acknowledge your sane judgment :slight_smile:

I feel you - at the same time I didn’t mean to make you work, so it’s all fair!

You were! And by ‘disengaging’ I was soon reminded of what I had to pay attention to.

I have come to a very handy and precise solution I can now be ‘artistic’ with :slight_smile:

Again, I can only imagine what your imput would have been with less arbitrary inquiry!
Now I’m trying to find ways to speed this up.

As I should have expected, the more complex (point count) the curve, the longer it takes to achieve what I want. Talk about ‘beauty has a price’.

I must wait 30+ seconds if I want to get the curve I prefer.

Cheers @diff-arch

Ah, cool to hear! :slight_smile:

What exactly do you want to speed up? The many colored curves are quite pretty, but I fail to understand what you do them. Do the vectors move the curve control points?

What do you think about this?

2020-09-25 19-06-03.2020-09-25 19_17_39

It’s a refined random walk within spherical bounds and the agents have a little leeway to surpass the bounds and turn around. Their trails are recorded too. This shows about 3 to 4 minutes of trail drawing and each trail is about 5000 document units long.

@diff-arch,

Thank you for your continued feedback.
The main difference is that your curves are random walks, while mine come from a pre-determined shape + point population.

Admirable! I would love to play with that! See more below.

I wanted to { not anymore } speed up the SpatialDeform.
I did so with less points.

Made sense: less points = less to deform.

All OK there.

Pardon me - here we go,

Shape (mesh) + points:

Curve from the points:

Random ‘walks’ along curve segments (via FlowAlongCurve):


note: these ‘random walks’ are not from your random walks example

The vectors were dictating syntax/forces for SpatialDeform to ‘pull’ the whole curve to the points - while maintaining its shape:

The dashed (yellow) curve being the spatially deformed curve.
I was doing that because I cared about new point locations for new spatial deformations.
Then tried different expressions/fall-off functions until I found what I liked.

loved it, but it’s slow. So I’m skipping it for now.

However, back to you:

I care about the ‘spherical bound’ even if it’s a mesh thinking it’s a sphere :wink:

Is there a way to inhibit this and instead have the agents simply ‘crash and bounce off’ or (even better) ‘crash and stick’ then turn around?

For clarity:
My most important goal aside from hitting the pre-determined points is to keep the curve(s) within the boundary and never trespassing it.

Here’s what I mean,

In this quick example walks-on-strands_01.gh (67.1 KB) (image below), I used your random movers (previous system), yet matching point count to my points.

Once recorded, I grab your ‘walks’ and flow them to my strands (LoL sounds funny).
Will most likely look too jagged past 2 or 3 iterations because of the scale of walks vs my model. It’s okay for illustrating, though.

So, now

<3
I envision your current refined method, producing one deliberately continuous walk, hitting all my predetermined points, never trespassing the {mesh} boundary - then I could deform the resulting curves later if I truly needed to.

Thank you for your patience/attention, I wish you the best!

You’re welcome. I find your work here quite interesting! OK, got it.

Also less processing. :wink:

Thanks, for the great explication!!
Is there a specific reason why you first draw the interpolated curve through your point set and then retrace and “jitter” the curve with random movers? The mover could also see the points as attractors/food and move to visit/consume them all while keeping on or inside the surface/mesh?

Ha. :smiley:

Sure, I’m not exactly sure what you mean by stick? Does this correspond to what you’ve imagined?

Roger! Roger!

:joy:

Got it. Makes my question above redundant!

Or the curves are deformed during the walk in the first place, while the points are visited and the the trail is drawn, I mean?

1 Like

Yes - The quantity and locations of the points are important.

Because the mesh/points precede the curve - and yes, the curve could adapt ‘live’ to changes of mesh/points…however the ‘jitter’ effect throughout the whole curve would have to remain consistent - meaning that’s what is desired.

I ‘flow’ the random ‘walks’ on to the split segments because it’s faster than making my own ‘jitter’ effect throughout the whole curve at the resolution I need it:


for this I must heavily populate the curve first, then feed that to cylindrical points to get my own jittery curve.

By ‘stick’ I mean ‘slide on’ or ‘walk on’ the mesh - then I should have said ‘fall’:


*note: just what it could be - calling it ‘stick’ but it’s more like a ‘brief landing’ for the agent - to account for an abrupt kink.

*edit:
or maybe I should ‘stick’ to being literal - I guess the trail wouldn’t be actually falling ,as that implies gravity rather than agents traveling though I am trusting you get my point.

Yes, I get that the points are the beginning of the rest, but what I meant was rather, why you don’t do everything with an agent. For instance, the mover could start at a randomly picked point and visit all other points, thus drawing the curve. The jitter would be a product of its random walk.

OK. I guess a non-jittery curve could be drawn by the agent that you then could apply your randomizing process to.

Got it. Thanks for the explanation!
I have an idea that I’m going to try towards the end of the week. I’m quite busy at the moment.

1 Like

that’d be great - but the mesh is happening before with multiple kangaroo effects, then I must freeze the mesh ‘where I need it’, then I map the points to the mesh, then make the curve. I guess it’d be a little cranky to have kangaroo and the movers running simultaneously.

That’s fine, even if the ‘jitter’ is ‘less’ than what I have at the end, it still serves as a nice template.

yes!

don’t sweat it!

Best to you

1 Like