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
Tags:
Super! Thanks! One more question and then thats it, i promise :)
If now built everything as you did, but I just have squares and circles, shaped the same size.
I guess this has to do with the bezier curve. Should the curve change by it's own, if I for example change the length or the number of boxes?
Or do I have to modify the curve each time?
or let me rephrase that, last question, can I give the biggest box a certain value and the smalest box another one and then create the boxes inbetween?
The curve does not change on it's own. You have to grab the handles and manipulate it, which changes the ratios between the boxes (try to figure out why - that's important!).
And no, you don't assign a size to a box. That is determined by the length of the line, the number of boxes and the shape of the 'Graph Mapper' curve.
It's all too common to finally get the results we want and stop but one of the delights of GH is manipulating the parameters to see what happens. For example, note the shape of the curve and its effect on the boxes/circles (below):
You can even move the circles from side to side by moving the 'Point On Curve' slider ("1.00" vs. "0.50"):
Or change the 'Graph type' and see what happens (again, good to understand why...).
Questions are fine. Hope you are learning a few things from this code, it's the best way. Remember to connect 'Panels' to outputs to see what's coming out of each component. Like this; the left panel shows the input to 'Graph Mapper' (the output of 'Series') and the right panel shows the output of 'Graph Mapper':
In the right panel, see how the gaps between the numbers are farther apart at the beginning of the list and closer together at the end?
Well? Did you get it to work? Understand the code? Change your spec ("move the goal posts")? Show us what you got? (upload code!)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by