Grasshopper

algorithmic modeling for Rhino

Hello everyone,

I am new to this forum. My name is Ben, I am a Design-Student from Bremen, Germany. Right now I´m workin on my Bachelor-Project and that is what leads me here. I learned Grasshopper on my own, so be gentle with my programming ;) .

Now my problem:

I built a chair-generator, where I can randomize the different components of the chair via sliders. Now I want to interbreed two chair configurations. So I wanna be able to either choose one of the „parents“-value or the middle between both values. As you can see in my file, I found kind of a solution for this (marked by the 3, in the picture), but its quite complicated and time consuming, especially considerung, that I want to do this proces with several generations of interbred chairs. Do you know any way to maybe automatize or simplify this process?

Greetings,

Ben

Picture explanation:

  1. First chair-data (as visualized in Rhino)

  2. Second chair-data

  3. My approach to my problem

  4. Executing functions that build up my chair

Views: 289

Attachments:

Replies to This Discussion

I'd say the following steps would be useful in your case:

  1. Turn your chair creator logic into a cluster. This cluster apparently needs lots of inputs, but so be it. If your chair have lots of variables, there isn't much you can do about that without actual programming.
  2. Create a secondary cluster around the first cluster, which accepts not just single variables, but lists of variables. This cluster processes these lists and averages all values in them, before it sends them to the inner 'make-a-chair' cluster. This allows you to 'merge' several chair prototypes.

A completely different approach, which will probably require some amount of VB/C#/python coding is to wrap all your chair parameters up in a dictionary or even a single string. This string is basically a single piece of data which contains all the variables that are needed to define a single chair. You can create this string using GH logic or using a script component directly.

Then you can create another script component which takes a number of these strings and blends, or averages, or interpolates them in some fashion.

I imagine some of your values are decimal numbers, some are integers, others may be booleans even. Writing specific code for dealing with them may ultimately be the easiest way.

--

David Rutten

david@mcneel.com

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