Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I'm just teaching myself the grashopper basics and was trying to figure the following thing.

I have a circle with the same diameter and I want to array this circle along a line with an undefined value, increasing it's density.

For this, I want to use boxes, which define the circles centre.

In the first box, the circle just makes around 5%, in the last box, the circles diameter is as big as the box.

So the question is, how to get all the boxes to array, ranging from my maximum box to my minimum box?

I was trying to do this using an attractor point, but this just keeps the box the same and changes the size of the circle, I want to do the oposite.

Thanks a lot in advance!

Simon

Views: 2646

Attachments:

Replies to This Discussion

Wow brah, this is a very confusing description...

I have a circle with the same diameter

Same diameter as what?

a line with an undefined value

Do you mean undefined length?

increasing it's density

Density of what?  What does "density" mean in this context?  Do the circles get closer together?

I want to use boxes, which define the circles centre.

Or is it the other way around?  From the remainder of your description, it sounds more like the circles define the centers for the boxes?  Or maybe not...

In the first box, the circle just makes around 5%, in the last box, the circles diameter is as big as the box.

This makes it clear to me that the diameter of the circles increase to fill the boxes?

ranging from my maximum box to my minimum box?

Oops, this sounds like the boxes change size?

but this just keeps the box the same and changes the size of the circle, I want to do the oposite.

And this seems to confirm that you want the circles all the same size while the boxes get smaller?

So the boxes start ~20 times larger than the circle (area or diameter?) and shrink as they approach the end of the line?

And I suppose you want the boxes (how many?) to start and end exactly at the beginning and end of the line?  Nothing beyond either end and neither end of the line "exposed"?

Well, that's about all the time I have - hope this helps, good luck.

Well, from what I understand you want it like this?

It's not exactly an easy or beginner problem I'd say, since I'm guessing usually you'd rather use iterative programming for that. But I found mostly there's quite a good workaround with grasshopper containers for most problems. Find attached the definition. Guess if you are beginner and understand how this definition works, then it is already a big step. Hope this helps.

Greetings, Oliver

Attachments:

Thanks Oliver!

I think as Joseph said, my description was somehow quite irritating, but it's hard to define a question without knowing what you are looking for exactly.

But what you did was exactly my problem. So thanks for your help.

Cheers, Simon

Sorry if I sounded irritated...  Baffled for sure, though, and a little amazed at the confusion evident in the description.  And to paraphrase what you just said, it's hard to provide an answer when you can't describe what you are looking for!

I didn't think about this much but was pleasantly surprised to notice how the circle diameter is a function of the smallest box size - which changes with number of boxes, length of the line and/or changes to the 'Graph Mapper' curve.

Next time, please try to describe your challenge better?  (click image to see animated .gif)

Joseph,

thanks for your help! I will try!

Looks like a really good sollution to my 'beginners' eyes.

Cheers, Simon

Oh, look how easy it is to add the arrays for each column (or row as Oliver did):

thanks joseph,

still trying to retrace your steps on your first post. What i liked at your solution is that I would have the possibility to define the length of my line and then array the circles inbetween.

Just trying find the "tools" you used.

joseph,

could you maybe tell me what this "number slider" like tool is you are using in the circles area?

never seen this before.

thanks, simon

I figured that just giving you the code was WAY TOO EASY and you wouldn't learn anything.  That '"number slider" like tool' is a 'Number Slider'!  Under 'Param | Input'.

P.S.  I glanced at Oliver's code and it's not that much different; if you hold 'CTRL-Alt' and then click/hold the mouse down over any component, GH will show you where to find it.

P.P.S.  Right click on the 'Graph Mapper' and choose 'Bezier' under 'Graph Types'.  I hope everything else is clear?

By the way, changing the length of the line in my code simply scales all the boxes and circles.

rebuilding it is actually a lot of fun and I really have the feeling of at least halfway getting it. :)

So far, everything looks good. just can't find this slider with the 'input' and 'output' side.

Really appreciate your help!

Ah, that!  'Point On Curve' under 'Curve | Analysis'.

Set to '0.50' as it is (the default) gives you the mid-point of any curve.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service