Grasshopper

algorithmic modeling for Rhino

Hi guys, I need and help, maybe it's a stupid question ... but now isn't easy to do it for me ;-)

I would like to divide a number into some number that the sum of it give me the initial number:

1000 INITIAL NUMBER = 100 + 200 + 700

or ...

1000 INITIAL NUMBER = 200 + 200 + 300 + 300

or ...

1000 INITIAL NUMBER = 100 + 350 + 150 + 50 + 150 + 200

It would be great if there are some slider that could control this "division".

Hope that someone could help me!! Sorry for my english!! ;-)

Views: 1163

Replies to This Discussion

Here is one approach. It doesn't give you nice round numbers, but it is fairly simple, and you can easily add additional sliders to the merge component. 

Basically the sliders control the relative proportion of the terms of the equation - the ratio of slider A to slider B will be the same as the ratio of term A to term B in the equation. Oh and the function in the f(x,y) component is Format("{0} = {1}",x,y). 

Below is a slightly more complex approach which guarantees integer terms but no longer exactly preserves the ratio of the sliders.

I used this C# component several times. You can pass a base value (e.g. 1000) and a value for the number of fractions you like to have.

Attachments:

Thanks a lot Andrew & Thomas, you save me!!!! Very kind of you to gave me the right "formula"!! ;-)

Amazing man!! I started to do a similar approach ... but never had a result!! ;-)

Attachments:

Thanks man!! ;-)

What do you want this design? 

I need this "formula"to know how many square meters I have for each different building.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service