# 'How to create priority over the other list?,' and another question

1. How to create priority over the other list?
2. And how should I proceed when I want to move the center position between the points of two lists?
create priority.gh (23.5 KB)

Re-examine your output (see the red error on the Pt param on the right?), redefine your goals more clearly and perhaps start over from scratch?

1 Like
1. How to create priority over the other list?

Components with multiple inputs will let you select the principal data. Right click the input and select “Principal”

1 Like

I thought you were kidding! I’ve never noticed that option before and can’t see that it has any effect.
What does that do?

1 Like

No priority here, just Avr (Average) of the three points at each grid point.

create priority_2018Feb3a.gh (24.4 KB)

create priority_2018Feb3b.gh (29.7 KB)

1 Like

It’s more about the priority of data structures. See number 1 here:

1 Like

I see. Pretty esoteric.

1 Like

Do you know, is it also possible to prioritize between three streams of data? With two streams I can use ‘Principal,’ but with three streams it becomes difficult.

I was thinking about using operators like the ‘nor-gate,’ but still, it does not seem the right logic. Do you know some other component name?

I was wondering, you use ‘average,’ but should it been great if it was possible to put a different value weight to each stream? So, one steam is more dominant over the other which makes this landscape look more realistic to what is seen at nature’s ‘wild’ streams. I was thinking about something like that. Do you know about such a ‘number slider component?’

It is actually about sliding the influence of each stream, maybe that is just a multiplication component, and applying that on the move-components within the values between the extremes. So, how to apply an influence-factor to each list and apply that on the movement of the original?

This question continues witht the unsolved question of:

There also a Weighted Average component, which allows you to specify the weight (or strength) of each individual value.

1 Like

I cannot figure out how ‘Weighted Average’ works, I now tried something like below.
I also, cannot figure out how to eliminate the 0-vectors, I do not need the 0’s, do you know which components can be used to remove the 0-vectors?
create priority 2.gh (27.2 KB)

Regular average assumes a weighting of 1.0 for all values, then divides by the number of values:

m = \frac{1 \cdot a + 1 \cdot b + 1 \cdot c + ... + 1 \cdot z}{N} \equiv \frac{a + b + c + ... + z}{N}

a weighted average allows for custom weights per value and divides by the sum of all weights:

m_w = \frac{w_0 \cdot a + w_1 \cdot b + w_2 \cdot c + ... + w_n \cdot z}{w_0 + w_1 + w_2 + ... + w_n}

This file shows three points with 3 different weights. If all weights are equal, the average will be exactly in the middle. If a and b are equal but c is zero, the average will be exactly in the middle of the line between the first and second point. The bigger the weight associated with a specific point (in relation to the other weights, weighting is entirely relative) the closer the average will be to it.

weightedaverage.gh (7.4 KB)

2 Likes

Thanks, that helped me a lot.
Something else I am trying to do is to stop the 0-vectors from influincing the design.

I tried to find duplicate or something else, but non of the components I used worked. So, what I am trying to do is to only let influence the vectors with values. There must be some component. The ‘Delete Consecutive’ component did not help either.

I think I have to find a way to find the ‘overlapping indices.’
Getting overlapping indices >> apply values with ‘average’ >> replace the 0-vector grid with value-vectors.

I think I have to do something here:
create priority 3.gh (28.3 KB)

The average is already “weighted” by the three sets of number sliders you have associated with each of the three attractor curves. You can get identical results with less code by summing/averaging the impact of the attractors so that each grid point is moved just once, instead of having three points that must be averaged later.

1 Like

How can I connect the coordinate with the movement? With this I can say, ‘okay, all movements averaging.’

So, for coordinate [1,1,6] these movements are applied with this weight. This kind of theory.

https://discourse.mcneel.com/search?q=multiple%20attractors

Movement averaging (weighted) is very easy. Apply a weight to each vector,sum up all vectors. Its that simple:weightedForce.gh (11.4 KB)

1 Like
2 Likes

3 Likes

my little sunday project, “method injection” to override wire display. Colors change depending on distance to each component.
However, i must admit, chances for eyecancer are great, and polyline wires are not as good as I believed they are.But maybe next weekend the colors are better;)

2 Likes