Grasshopper

algorithmic modeling for Rhino

Hey Everyone,

I'm looking to create a pattern on multiple surfaces that makes the individual squares generated from a grid turn on / off when told to.

With the file attached, I've created a random pattern on a box with certain squares on and off.


I'm now looking to apply a system to the pattern so Eg. If true, the square stays on, false it turns off. I've attached a sketch (1) to help explain (hopefully) what I'm trying to do.


Does anyone know how I can do this or able to show me if its possible?

Any help would be greatly appreciated, still trying to learn Grasshopper as I'm going along.

Chris

Views: 607

Attachments:

Replies to This Discussion

Remove the domain input to 'Random' so you use the default '0.0 To 1.0', then right click 'Random' and choose 'Integer Numbers'.  Connect the output directly to the 'Dispatch P (Pattern)' input:P.S.  "1" and "True" are interchangeable for 'P (Pattern)', as are "0" and "False".

Attachments:

I feel like I didn't understand your question but, try as I might, I still don't understand?

What do you mean by "apply a system to the pattern"?  Something other than 'Random'?

Are you asking about partitioning the output of 'SubSrf (Isotrim)' into columns and rows?

Hi Joseph, system was the wrong word to use. Yes, I was trying to see if another input other than random can be used.

As the random input decides which squares are '1' and '0', I was looking to find a way in which I can input '1' and '0' myself to create a pattern in the squares.

Dividing the output surface into columns and rows would be extremely helpful as well.

Sorry for the confusion and any further advice would be appreciated.

Sure, you can generate the sequence of ones and zeros any way you want.  An image sampler comes to mind...

You could use 'Random Reduce', as shown in the white group (below).

The red group partitions the 'SubSrf' output into columns and rows.  The 'Tree/List Viewer' group (an EXTREMELY HANDY general purpose debug tool I wrote myself) lets you select a tree branch (column) with 'path idx' slider and item (row).  You can open both of those clusters to see how they work, and have an entirely different "system" of making sections visible.

Attachments:

Even something as simple as 'List Item' produces a "pattern" on the partitioned 'SubSrf' output:

'Cull Pattern' presents other possibilities:

Thanks for the help Joseph, This seems great, I'll try using either an image sampler or the 'Random Reduce' you've shown and see how it works out.

The debug tool is also a great help, I'll make sure to look into the cluster and try and understand how it works! I appreciate you showing it to me.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service