How to instruct an Attractor script to also move the points in a ‘Z’ direction, away from the insertion point

Hi there,
I was wondering if someone would be able to point me in the right direction. I’m about one month into the GH world and I have a uni project which I am trying to put together. Attached is my current script, the two issues I am struggling with in particular are:

  1. I want the attractor portion of the script (Step 2) to scale the fragments of the Voronoi component as it is, however, I was hoping to have the points/ Voronoi fragments to also move in the ‘Z’ direction away from the ceiling (in the opposite direction they currently are). Ideally, the smaller fragments to be at a greater distance from the surface plane (ie ceiling) than the larger whole pieces (see mark-up sketch).

  2. In step 5, I am trying to color-code the ceiling panel fragments based on their ‘Z’ (vertical) location, but it’s not working for some reason. Sorry, I have no idea what I am doing wrong with this part.

    I know there are probably so many other issues that I am unaware of, but this is where my skills currently are. Also, apologies for the slowness of the file (if you download and open), not sure what I’ve done wrong there either.

Thank you in advance, Chris.
DimarcoV23 (Option C).gh (89.9 KB)

Like this?

DimarcoV23 (Option C) (86.1 KB)

Wow, yes!

I was wanting the struts a little shorter, but I am definitely not complaining, I reckon that’s something I can work out. Thank you, thank you - I appreciate it Adam.

Thanks Chris.

1 Like

Far out Adam, you did so much work to the file. I had it so wrong, thank you again. Chris.

No problem.

Actually, you dont need the join after the Voronoi component, just Clean Tree to remove the nulls, and graft after.

Oh, that’s good - thank you. I don’t understand why yet, but I will play with it more to try and get my head around what you have suggested. Thanks Chris.