Grasshopper

algorithmic modeling for Rhino

How to select some elements created with an array to move them along a vector?

Hello,

I just created a rectangular array that contains circles. But I would like to move in the z direction some of them, so my question is how can I select only certain circles to move them along the z vector?

Assuming that in the image attached the 9 elements can be represented in a matrix as zeros and ones elements, this would result in:

1 0 1

0 1 0 

1 0 1

And what I want is to move only the ones (or zeros)

Thanks in advance,

Martha

Views: 853

Attachments:

Replies to This Discussion

You basically have two options:

  1. Move all circles, just use zero-vectors for the ones that should stay in place.
  2. Split the data into two, move one subset, then merge it all back together again.

[1] is usually the simpler approach, but it does depend on context. 

Attached one solution based on [1].

Attachments:

Thank you very much David,

I tried option [1] as in your attachment and it worked quite well as I wanted.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service