Grasshopper

algorithmic modeling for Rhino

Hey everyone,

 

I've added a bunch (I won't say 'set') of components that expose Mathematical Set like operators. These components work on simple data types only:

  • Booleans
  • Integers
  • Numbers
  • Complex Numbers
  • Strings
  • Points
  • Vectors
  • Colours
  • Intervals

You cannot use them on anything else (at present at least). The following examples all use Strings, but that's just to make it obvious what's happening. Basically I'm looking for ideas for other (useful) components that operate on sets.

 

A note on Sets (read the Wikipedia article for a basic explanation). A Set is a collection of distinct objects. You shouldn't be able to find the same object twice in the same set. Objects inside sets are referred to as "members". Although in actual Set Theory, a set can contain other sets (it could even contain itself), this is not possible within the framework of Grasshopper. It's easiest to think of Sets as special Lists that don't allow more than one instance of a specific value. Some operators require this property, others don't. I might decide not to enforce it after all.

 

Here's a list of components which I already coded up.

 

Create Set. Convert a list of values into a proper Set (no duplicates, no nulls):

 

 

Set Union. Combine all members of two sets:

 

 

Set Difference. Remove all members from A that also occur in B:

 

 

Set Symmetric Difference. Remove all members from A that occur in B and vice versa:

 

 

Subset. Test whether all the members in Set B are also present in Set A:

 

 

Set Intersection. Create a new set which contains all members that are present in A and B:

 

 

Set Carthesian Product. (Only works on sets with identical cardinality):

 

 

Replace members. Replace all members in A that match some value with another value:

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Views: 7000

Replies to This Discussion

I would love to see one ARROW at each end of the Numeric Slider and be able to click it to increase or decrease the value of the slider.

 

Sometimes I am too close the the solution I want or to the FORM I am looking for, but I can not get it, sliding the center of the Numeric slider. I know I can type the number, but I do not know sometimes either.

 

Andres

 

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