Problem of Slowing down Vector in Anemone

Hi All

in the attached script, I tried to slow down the Vector using a multiplication component but instead of a decreased in vector length, GH returned real numbers which would not work for the Move component.

Does anyone know how to reduce the vector speed properly?

Thank you so much!

Yutaka

slow dow vector question.gh (9.5 KB)

Hi @rhinospaced,

The issue is that you don’t provide an initial vector to the D1 input of the Loop Start component. By default, it’s set to NULL, which means that multiplying by 0.95 inside the loop, won’t do much good.

How the Loop Start component manages to output 0.95, instead of 0.0, I don’t know? 0.0 times 0.95 should be 0.0? :thinking: Well, it doesn’t matter either-way!

You need to start with an initial vector that you then can change iteratively!

Here’s an example using a random, initial vector for each random point.

If you want the agents to slow down over time, simply don’t reset the velocity vector to magnitude 1 at the end of each iteration!

2020-05-24 09-14-08.2020-05-24 09_15_54

Note how the preview of the agents get smaller over time! I draw a cone for each one of them. The radius and height of each cone are defined by its corresponding agent’s current velocity vector. When the magnitude of this velocity vector gets closer and closer to 0.0, the overall size of the cone, representing the agent, gets also smaller and smaller.

This should do the trick!

slow dow vector question V2.gh (14.5 KB)

Hi P1r4t3b0y

Thats exactly what I am looking for, like fireworks. Thank you so much. For Random Vectors, I normally have 2 options,
Option 1: give a random seed for say X and and then use Additional to make the another 2 random seed for Y and Z vectors( yours is more elegant)

Option 2: Same as 1 but using the Counter of the Loop Start as Seed 1 (X value)

Please let me have your views on these (maybe dump)methods !

Thank you so much!
Yutakaslow dow vector question2.gh (33.3 KB)

slow dow vector question V3.gh (18.2 KB) You’re welcome!

Would absolutely also work! :slight_smile:

This could be handy, if you want to randomise the vector at each iteration, which would give a completely different result. The agent would move in a more abrupt, unpredictable, less linear fashion.

2020-05-24 11-44-27.2020-05-24 11_45_24

For this you’d have to introduce a third loop variable (e.g. D2) to keep track of the decreasing magnitudes and scale all current, new unit vectors to these magnitudes at each generation to make them go ever slower.

slow dow vector question V3.gh (18.2 KB)

Thank you so much for your very detailed comments, very informative and useful! Much appreciated!
All the best!!

Yutaka