algorithmic modeling for Rhino
I did what you always do when you need to make a tiny snake model as a detail on a larger piece: write a definition to evenly lay out scaled scales on a tubed form. :p
Tags:
Comment
Hi Gwendolyn, thank you so much for your detailed answer. I've gone down a different path since I wasn't able to find as much documentation on Anemone; only found this succinct video: https://vimeo.com/94105570
If you know of any other resource please share it.
I'm getting reasonable results with the different approach I've taken. I'm currently making experiments and figuring things out in an attempt to solve the paneling issues you predicted and avoided when you chose to use Anemone. This is where I'm sharing my results: http://www.grasshopper3d.com/forum/topics/snake-scales-distribute-o...
Once I have more experience and time I will have another go at attempting to work with Anemone starting with the sphere stacking example you detailed so nicely. Thanks again!
Best regards.
Leonardo,
I think, if you still want to try to replicate this method, that you need to spend some more time getting comfortable with Anemone. Have you tried looking at any sample files for it?
Specifically, in your picture, it looks like you're feeding two different pieces of data into the same Data input (D0) of the Anemone Loop Start component. If you zoom in on the component in Grasshopper, you'll see that you can add and subtract Data inputs via little +/- symbols, so you can have D0, D1, D2, etc. (Note: when you do this, Anemone Loop End will return an error if it doesn't have the same amount of Data inputs as the Loop Start, so be sure to add them there as well.) Attaching your original data to different inputs keeps them nicely separated during the looped Anemone process.
The nature (and usefulness) of Anemone is that it allows you to take data output by some functions and use it as the input for that same set of functions (normally forbidden under usual Grasshopper logic). So let's say that you want to take a sphere(Sphere0) and stack progressively smaller versions of that sphere on top of it. You feed the sphere into [Loop Start] as D0, and right away, it comes out of the [Loop Start] D0 output exactly the same, because nothing has happened to it yet. You take Sphere0 from the D0 output, let's say scale it by .8, and transform it up appropriately so it sits on top of the last sphere. Now you have Sphere1! Feed Sphere1 into the D0 input of [Loop End], and now (if the # of repeats allows) Sphere1 is the D0 output of [Loop Start]. So if it goes again, it'll scale and transform Sphere1, resulting in a smaller Sphere2, and so on and so forth for as long as you want. If you right-click on the [Loop End] component, you'll see some options labelled "Output after the last" and "Record Data". If neither option is checked, then you'll see the loop calculating in real time, and the only thing that will come out of the D0 output for [Loop End] is the smallest sphere. If you check only "Record Data," then D0 will contain all of the spheres made from the loops. If you check only "Output after the last," then you won't see anything output to D0 until it's entirely finished calculating all the loops. If you check both options, then D0 will output all the spheres, but only after it's finished calculating everything.
In my snake pictured here, there is a constant # of scales placed around each loop of the tube, let's say 10. But since the tube has variable circumferences, the size of the scales needs to vary based on the circumference of their loop. Furthermore, since the size of the scales varies, the distance between each loop must also vary so that there aren't unsightly gaps between loops. So you take the length of Loop0 and divide it by 20 (2 times the # of scales, since you only use every other scale to achieve this pattern), and use that as the distance between Loop0 and Loop1. But since Loop1 has a smaller circumference, Loop1 divided by 20 is going to yield a smaller number than the first one, and that's why you need to use Anemone to make a loop to find all of this out.
This might be more granular than you wanted, but I hope that some of it helps.
Hi guys,
I'm trying to recreate this but I'm new to Grasshopper. Could you help with the definition?
I have Anemone installed and have tried to build a definition following what Gwendolyn wrote.
The "feed the larger open end ring of the tube Srf and the guide Crv into Anemone" part I think I might have gotten right.
I'm stuck on the "takes the starting ring, divides it by the number of scales around I want".
Hi Gwendolyn
Many many thanks for your generous explanations. i'll try this soon.
Patrick:
The definition has two inputs: a tubular Surface and a Curve that follows the center of the tube (easy if the Srf was piped around the Crv to begin with).
While I considered using Paneling Tools at first, it seemed inclined to divide the Srf at even intervals, and since I wanted the rings of scales to be spaced in proportion to the width of the tube at their location, that wasn't going to work for me. So instead I relied on Anemone to generate the rings in a Looped definition.
Pre-Loop: I feed the larger open end ring of the tube Srf and the guide Crv into Anemone.
Within the Loop: It takes the starting ring, divides it by the number of scales around I want, finds the length of one divided segment (x), cuts x distance off the end of the guide Crv, and finds the next ring x distance down the Srf. The Loop takes the new ring, the shortened guide Crv, and the x distance and repeats the whole process until half the length of the guide Crv is shorter than x, at which point it stops looping and outputs the collected rings, guide Crvs, and x distances.
Post-Loop: I add the original naked edge rings of the Srf to the list of proportionally spaced rings, divide them by my scales number, choose the points I need to create a diagonal grid instead of a squarish one, place a sphere at each point, and scale the spheres to get a better scale shape.
And that's it! It's not a terribly complicated definition, and it could be elaborated on a lot more if needed (I didn't need a better scale shape than a smooshed sphere, for instance). Hope this helps.
Hello Gwendolyn
This is amazing. Any chance to get your definition or a hint in the right direction? I'm still a newcomer with gh and need some examples or a little help. how do i achieve such a pattern? did you use paneling tools?
best
Patrick
Hi Gwendolyn,
Since you mentioned this is part of larger piece, you've piqued my curiosity. Could you please post a picture of the final product, whenever its available?
Thanks,
Ethan
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
You need to be a member of Grasshopper to add comments!