Parameter to stretch or scale certain rows/columns on a grid?

Hi there! I’m relatively new to grasshopper and I’m currently working on a uni project, but I’ve hit a brick wall. I’m trying to create a hexagonal grid with a gradient snake-like pattern, but I can’t seem to get the parameters I’m looking for. I attached a picture with some markups to try to better clarify and explain what I’m trying to accomplish. Does anyone have any suggestions or recommendations?

Any help would be EXTREMELY appreciated!

Natural Systems Grasshopper File 10012021.gh (23.0 KB)

You could use Graph Mapper something like this…


Natural Systems Grasshopper File 10012021_re.gh (13.5 KB)

2 Likes

@HS_Kim Is there any way to add an attractor point to this? I tried a few different ways but I’m not having any luck.

Like this? I made some little changes to @HS_Kim def, hope he doesn’t mind.

You need to be more clear and specific in what you want. It is pretty hard to guess from a single sentence. See if this works for you. Hopefully you can get the idea and modify accordingly if not.

natural systems_attractor.gh (25.4 KB)

Sorry about that and I attached some more pictures (and a different script) to help better clarify this time, but I’m trying to add an attractor point to help rotate some of the panels as I did in the attached script.

Natural Systems GH_10042021.3dm (85.6 KB)
Natural Systems GH_10042021.gh (12.4 KB)



Rotate how? In what direction? Should there be more rotation or less rotation the closest to the point?

What is wrong with your current def? It looks ok to me.

So I initially started out with script A (the blue script w/ the attractor point, but w/o the graph mapper that created the gradient) so @HS_Kim helped rewrite the script to create the gradient (which became script B), however it did not have an attractor point like script A. So I’m am trying to figure out a way to combine these two elements (1- the rotating panels from the attractor point & 2- create a gradient effect by using the graph mapper) into one single script.

In addition, I would like to just continue with script B but I’m not sure if I would be better off just trying to include the graph mapper into script A.






Natural Systems GH Script A.3dm (109.0 KB)
Natural Systems GH Script A.gh (14.9 KB)
Natural Systems GH Script B.3dm (21.3 KB)
Natural Systems GH Script B.gh (19.3 KB)

This?

Just grab the curve of the panels at the end of the definition, get their center with area, and measure the distance to the attractor point.

Natural Systems GH Script A rotation.gh (38.9 KB)

1 Like

OMG!!! I CANNOT THANK YOU ENOUGH!!! I’m still very new to grasshopper and still learning the ins and outs, but thank you so much. It’s beyond greatly appreciated! Also sorry again for not explaining clearly in the beginning!

1 Like