Generative Components – scripting with C#

28Feb09

This week I was taking part in three-days Generative Components workshop at the University of Westminster in London. Half of the first day was dedicated for introduction to the GC environment and model-based transactions. Later Sean Hanna and Alasdair Turner gave several tutorials on script in GC. The scripting language is C#, which turns out to be very similar to Processing.

Here is what Agata Guzik and me managed to script by the end of last day.

gc21

The easiest thing to do in GC is to populate a 2-dimensional grid of points (most probably “polygons by point grid” in GC nomenclature) with components. Sean introduced a way of breaking away from this notion by turning a 3-dimensional array of points into a 2-dimensional one. He still created a single plane of “polygons by point grid” but this time based on two 2d arrays of points arranged into one.

We then tried to rewrite the script so that it could incorporate more 2d arrays. We have created a new 3d array and we stacked 2d arrays (each containing two rows of points) one on top of another. Unfortunately it turned out that we can not use “polygons by point grid” any more – since it can be only fed with 2d array and not a 3d one. We have used a b spline surface by poles instead and then we have converted the surface into a set of polygons. Last step was (in order to celebrate GC’s name) population of the polygons with components which have a capacity of opening or closing (based on the value of graph variable).



No Responses Yet to “Generative Components – scripting with C#”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.